POSIX equivalent of rtems_timer_fire_after

Peter Dufault dufault at hda.com
Tue Mar 9 21:04:37 UTC 2004


On Mar 9, 2004, at 3:47 PM, Joel Sherrill <joel at OARcorp.com> wrote:

> RTEMS supports POSIX timers.  But re-reading the Open Group
> specification again, I only see signals at timeout.
>

To be upfront: I haven't used this, but recently looked it over
and thought it must work almost the way I want it to.

timer_create() takes a struct sigevent to associate with the newly
created timer.

struct sigevent has a pointer to a notification function.  It looks
to me as if that should be called back with si_code set to SI_TIMER
(if SA_SIGINFO is set) when the timer expires.  So each timer can have
its own function, as opposed to a single alarm handler.

Unfortunately, I don't see a defined "data hook" for this - just the
undefined "void *context" argument.  So I'm thinking each timer can
have it's own function, but there is no easy way to specify a context.

Peter

Peter Dufault
HD Associates, Inc.




More information about the users mailing list