https://cis.temple.edu/~giorgio/cis307/readings/futex.pdf
This exemplifies that using futexes is really tricky since they provide problems even to their inventors. This docu-ment will hopefully provide correct and detailed instruc-tions on how to use futexes. First an understanding of the kernel interface and its semantic is needed.