This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: SIGEV_THREAD


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]