futexes do not promise to behave like actual semaphores the last time I checked them out.
These ones do. But the main difference is not that. They come with a semalt() op that tries to do a down at the same time on a set of semaphores. So, if you model tubes (nix channels) as a regular producer-consumer with two semaphores (one for holes one for messages), you can alt them by relying on semalt. If you are lucky, you don´t enter the kernel. If you are not, you do, but at least you get the semantics you´d expect for a semaphore. On Wed, Sep 14, 2011 at 7:32 PM, David Leimbach <leim...@gmail.com> wrote: > >> >> - Optimistic semaphores, a new type of semaphore which lives half in >> and half out of the kernel, and which in many cases will never run in >> kernel > > How is this both like and not like a futex? >