On Wed, Oct 19, 2011 at 02:24:49PM +0000, Grant Edwards wrote:
> 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. :)

The problem with that approach is the limited number of available
timers. From the current Debian man page :

``The kernel preallocates a "queued real-time signal" for each timer
created using timer_create(). Consequently, the number of timers is
limited by the RLIMIT_SIGPENDING resource limit (see setrlimit(2)).''

This limit is 11 under Linux. This kind of problems is usually solved
through abstraction libraries such as libevent.

-- 
Richard Braun
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to