POSIX equivalent of rtems_timer_fire_after

Richard M. Barry R.Barry at sstl.co.uk
Tue Mar 9 16:08:30 UTC 2004


I'm rewriting some code that uses a Classic API timer to trigger the excecution of a procedure after a certain amount of time has elapsed, by calling rtems_timer_fire_after(... , rtems_timer_service_routine ,...)

I want to rewrite the code to only use the POSIX API, so I have to implement an equivalent mechanism.   My question is, is the best way to do this:

1.Start a POSIX thread (containg the code previously in the rtems_timer_service_routine) that waits for a signal using sigsuspend(), and then 
2.start a timer that fires the needed signal in my main thread?   

Just making sure I understand the use of sigsuspend() correctly.

Thanks,
Richard




More information about the users mailing list