Thanks for the creation! But sorry man, the historic description unfortunately added to the confusion. When I read the original description, I thought it’s a user mode lock and was thoroughly confused. Only after I read the implementation of futex in kernel and its usage in the implementation of pthread_mutex_lock in user mode, that I realized futex was not a lock. It’s a waiting and signaling operation.
Hmm, looking at the latest source code, my original quote has been split, but:
* Fast Userspace Mutexes (which I call "Futexes!").
* (C) Rusty Russell, IBM 2002
...
* "The futexes are also cursed."
* "But they come in a choice of three flavours!"
https://github.com/torvalds/linux/blob/master/kernel/futex/c...