Problems Creating POSIX Timers SIGEV_THREAD notification

Sam Lost slostuk at
Fri Dec 3 09:24:46 UTC 2010

I am having some problems with POSIX Timers under RTEMS.
I am currently evaluating the RTEMS Operating System to access it's
I have a module written to the POSIX API I have been able to compile an run
the code under Linux and under a number of COTS RTOS's.

However I am unable to create a Timer using the  timer_create() function
when setting event.sigev_notify = SIGEV_THREAD.

The following document has been unable to help as the timer_create
information is limited

 I notice from the following document:

that the POSIX timer_create() function is implemented as opposed to a
partial implementation

Below is the section of code that I am attempting to run

   ts_device_configuration *device_configuration  =
   tGDEF_UINT8                  loop_count                    = 0;
   struct sigevent                event                            = {0};
   int                                    status                           =

   event.sigev_notify = SIGEV_THREAD;
   event.sigev_notify_attributes = NULL;
   event.sigev_signo = SIGALRM;
   event.sigev_notify_function = device_alarm_signal_handler;
   event.sigev_value.sival_ptr = (void*)device_configuration;

   for(loop_count = 0; loop_count < DEVICE_TASK_NUMBER_OF_DEVICES_SUPPORTED;
loop_count++, device_configuration++)
      /*lint --e(506) Constant value Boolean */
      assert(device_configuration != NULL);

      status = timer_create(CLOCK_REALTIME, &event,
      if(status == EERROR)
         (void)printf("Timer Create Error: %s\r\n",strerror(errno));

      /*lint --e(792) void cast of void expression */
      assert(status == EOK);

I receive a Invalid argument error number.

I noticed the following within the timer_create function (timercreate.c)
which appear to suggest that RTMES does not support SIGEV_THREAD

if ( ( evp->sigev_notify != SIGEV_NONE ) &&

( evp->sigev_notify != SIGEV_SIGNAL ) ) {

/* The value of the field sigev_notify is not valid */

rtems_set_errno_and_return_minus_one( EINVAL );

Am I missing something or is SIGEV_THREAD notification from POSIX timers not

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the users mailing list