Alex Waugh alex at
Thu Feb 3 13:47:55 PST 2005

In message <3325. at>
          "Nick Burrett" <nick at> wrote:

> Alex Waugh said:
> > Nick Burrett wrote:
> >
> >> Alex,
> >>
> >> Could you have a look at implementing the 'sigwait' function in UnixLib
> >> ?
> >> I am uncertain if/how you are handling signal delivery to threads.  This
> >> would be most useful to improve Ada Tasks support.
> >
> > Currently the signal handling doesn't have any concept of delivering a
> > signal to a particular thread. I'll investigate how difficult that would
> > be.
> OK, that's what I suspected.  I think it will entail a fair bit of work.

I've had a quick look at it now, and I agree that it would be a fair
bit of work to implement it properly. However, I think it would be
possible to implement a partial solution without too much effort, by
making use of condition variables. A call to sigwait would cause a wait
on a condition variable, then a call to pthread_kill would signal the
condition variable before raising the signal. Normal signals wouldn't
cause sigwait to return. Would something like that be good enough for


Alex Waugh                                           alex at

PHP, Roots, Subversion, WebJames and more from

More information about the gcc mailing list