Messages in this thread | | | Date | Mon, 13 Sep 1999 18:01:29 +0200 | From | Marc Lehmann <> | Subject | Re: POSIX aio vs completion ports |
| |
On Sun, Sep 12, 1999 at 11:23:57PM -0400, Chuck Lever <cel@monkey.org> wrote: > > My strategy: search for the first rt signal that's not got SIG_DFL as > > its handler. > > you have to select a signal number and set up the signal handler in a > single system call. otherwise, you're racing with other threads that > could be doing this at the same time, right?
sigaction itself is atomic.
It would be messy to write a userspace function that searches for a "free" signal, replaces it with its own handler and replaces it back again when the old handler has been changed. You would need to make sure, of course, that any signals having been delivered in the meantime would get routed to the old signal handler, but maybe you can just block them shortly.
Messy, but should work, no?
-- -----==- | ----==-- _ | ---==---(_)__ __ ____ __ Marc Lehmann +-- --==---/ / _ \/ // /\ \/ / pcg@goof.com |e| -=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE --+ The choice of a GNU generation | |
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |