what is wrong with this?
I get a unresolved symbol sigprocmask. I have looked in the header file
posix/signal.h and the finktion is there.

#include <rtl.h>
#include <rtl_time.h>
#include <rtl_sched.h>
#include <time.h>
#include <posix/signal.h>

void nullhandler(int);

int init_module(void) {
  clockid_t local_clock;
  struct timespec tp,real;
  hrtime_t delay;
  rtl_sigset_t block_these, pause_mask;
  struct sigaction s;
  int i;

  local_clock = rtl_getschedclock();

  if(clock_gettime(local_clock,&tp)<0) {
    rtl_printf("error in clock_gettime\n");
    return -1;
  }
  rtl_printf("time returned sec : %d nSec : %d\n",tp.tv_sec,tp.tv_nsec);

  clock_getres(local_clock,&real);

  rtl_printf("time returned sec : %d nSec :
%d\n",real.tv_sec,real.tv_nsec);

  /* this is not a posix standard funktion */
  delay = 1000000000 / 10000; /* 1/10 mSec */
  if(rtl_setclockmode(local_clock, RTL_CLOCK_MODE_PERIODIC, delay)<0)
    rtl_printf("rtl_setclockmode failed\n");
  else
    rtl_printf("rtl_setclockmode succes\n");

  /* tring once again */
  rtl_sigemptyset(&block_these);
  rtl_sigaddset(&block_these, SIGALRM);
  sigprocmask(SIG_BLOCK, &block_these, &pause_mask);      <- this goes
wrong ?????????????????????????????

  /* set up handler for SIGALRM */
  rtl_sigemptyset(&s.sa_mask);
  rtl_sigaddset(&s.sa_mask, SIGINT);
  s.sa_flags = 0;
  s.sa_handler = nullhandler;
  if (sigaction(SIGALRM, &s, NULL) < 0) {
    rtl_printf("TEST : error in sigaction\n");
    return -1;
  }
  /*
    for(i=0;i<10;i++) {
    sigsuspend(&pause_mask);
    rtl_printf("succes\n");
    }*/
  return 0;
}

void cleanup_module(void) {
}


void nullhandler(int x) {
}



-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to