On 2011-10-19, Rich Felker <[email protected]> wrote:
> On Tue, Oct 18, 2011 at 08:42:52PM +0000, Grant Edwards wrote:
>
>> For now, I'm rewriting the code to use SIGEV_SIGNAL.
>
> If you want thread delivery, it would be easiest to just make a thread
> that enters a loop calling clock_nanosleep to sleep until the next
> intended wakeup time then calls your callback function...
That would be a lot of wheel-reinventing. I don't really feel like
re-implementing an entire timer subsystem with a sorted-list of timer
intervals and functions to insert/remove/set/reset/enable/disable
timers.
It's way simpler to use SIGEV_SIGNAL and then set up a thread that
calls sigwaitinfo() in a loop waiting for the timer signal. The
kernel's quite good at keeping track of timers and figuring out when
the next one times. :)
--
Grant Edwards grant.b.edwards Yow! ! Now I understand
at advanced MICROBIOLOGY and
gmail.com th' new TAX REFORM laws!!
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc