Under QNX4, timer_settime() can be used to schedule a thread and run a function periodically inside the thread. Windows provides the same thing with SetTimer(). However under QNX6, the argument list for timer_settime() does not provide a way to pass a function.
Any ideas on how to acheive something similar to above on QNX6?
It take a sigevent, which, you can initialize a SIGEV_THREAD (look at your sys/siginfo.h) to it. This will result a new thread being created, and the specific funcitons being execuated. But this is a very expensive way.
The “usual” way is to prepare a “SIGEV_PULSE”, and receive that pulse.
With dispatcher, you can use pulse_attach() to associate a pulse code with a function, thus, once the timer timedout, a pulse will send to you, and your function will automaticly called.