Why it matters
Futexes make mutexes fast. Foundation of Linux threading.
Advertisement
The architecture
Fast path: atomic CAS in user.
Contention: kernel wait.
Wake specific waiters.
Advertisement
How it works end to end
Linux futex syscall.
Fast uncontended path.
Kernel wait on contention.