Re: [PATCH] [2/2] posix message queues

Ulrich Drepper
2003-10-05T15:59:32Z

Peter Wächtler wrote:

> Userspace translates SIGEV_THREAD to something that uses SIGEV_SIGNAL.
> Ulrich made a suggestion to use a futex, but I think of something even
> more lightweight. Just put the requestor right to sleep.

This has the disadvantage that it codifies the requirement of creating
the thread for the userlevel signaling ahead of time. While this is a
valid implementation it is not the best (resource-wise) and doesn't
allow for optimizations. Using a futex will allow to implement a scheme
where one single thread does the waiting for possibly many requests.
Imagine the benefits in case there are dozens of outstanding requests.
The additional system exit+entry isn't that expensive to justify
removing the flexibility.

--
--------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat `--' drepper at redhat.com `---------------------------