This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: SIGEV_THREAD
- From: george anzinger <george at mvista dot com>
- To: Ulrich Drepper <drepper at redhat dot com>
- Cc: "libc-alpha at sources dot redhat dot com" <libc-alpha at sources dot redhat dot com>
- Date: Mon, 11 Mar 2002 13:00:14 -0800
- Subject: Re: SIGEV_THREAD
- Organization: Monta Vista Software
- References: <3C8D12FF.9AF8862A@mvista.com> <1015879227.16743.836.camel@myware.mynet>
Ulrich Drepper wrote:
>
> On Mon, 2002-03-11 at 12:26, george anzinger wrote:
>
> > It is not clear
> > what to do here in terms of integrating the POSIX extensions into the
> > kernel.
>
> Implementing this is easy. Just look at the kernel aio code. The new
> thread is created before the kernel is called for the timer. This new
> thread just lingers around until the timer expires, then does its job of
> calling the user-provided function.
>
In other words a.) there is one thread per timer, and b.)it does a ??
call to wait for the expiration?
What does it do then? In the timer case, it could be repeating, so I
guess it just waits. Do you then trap timer_delete() and kill the
thread then?
I guess this would work all right in the current kernel, but if we ever
do get POSIX signals, it could be a problem. I.e. now we can use any
signal we want and just do a sigwait, but POSIX signals will want to
send the signal to any available thread, which could be a problem.
Even today, however, we need to get the signal to be delivered to the
waiting thread. I do this in the high-res-timers package, but it
depends on CLONE_THREAD and thread groups, which the library does not
use yet.
> --
> ---------------. ,-. 1325 Chesapeake Terrace
> Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
> Red Hat `--' drepper at redhat.com `------------------------
>
> ------------------------------------------------------------------------
> Name: signature.asc
> signature.asc Type: application/pgp-signature
> Description: This is a digitally signed message part
--
George george@mvista.com
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Real time sched: http://sourceforge.net/projects/rtsched/