timer_create problem

Aitor.Viana.Sanchez at esa.int Aitor.Viana.Sanchez at esa.int
Wed Jun 13 17:57:36 UTC 2007

Hi all,

i am having a look to the CANFestival v3.0 trying to port it to RTEMS. I 
get the code already running over RTEMS but I have a problem with the 
timer_create POSIX function. 

The main.c source code gets inside the RTEMS configuration which includes:

#define CONFIGURE_MAXIMUM_TIMERS            10

/** RTEMS Configuration */

/** POSIX Configuration */

When I try to create a timer calling the timer_create routine:

        memset (&sigev, 0, sizeof (struct sigevent));
        sigev.sigev_value.sival_int = 0;
        sigev.sigev_notify = SIGEV_THREAD;
        sigev.sigev_notify_attributes = NULL;
        sigev.sigev_notify_function = timer_notify;

        status = timer_create (CLOCK_REALTIME, &sigev, &timer);
        if (status != 0)
                        MSG_ERR(errno, strerror(errno), status);


i got an error which is quite weird. I got the errno = 22 which is 
"invalid argument", that means that the specified clockid (CLOCK_REALTIME) 
is not defined. Nevertheless, i tried to call the function clock_gettime, 
which also needs the clockid (CLOCK_REALTIME) as a parameter, and i got no 
problem at all.

I am using RTEMS 4.6.5.

Do you have any idea that could help me to solve this problem ?


Aitor Viana Sánchez

ESA - European Space Technology Centre (ESTEC)
TEC-EDD - Data Handling and Computing Section
ESA/ESTEC P.O. Box 299 / 2200AG Noordwijk ZH, The Netherlands
Tel (+31) 71 565 6727
Email: aitor.viana.sanchez at esa.int
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20070613/c456a91a/attachment-0001.html>

More information about the users mailing list