* Fons Adriaensen:
You can build such a thing on top of condition
variables - that
is what they exists for - to let a thread wait one any condition
you may want, no matter how complicated.
But don't you need an additional context switch, from the event
listener thread to the actual processing thread? You could use a
leader/followers scheme to deal with this, I think, but it's quite
complicated. Doing it in the kernel would probably reduce overall
complexity.