Hacker News new | ask | show | jobs
by jrockway 5303 days ago
Acquiring a mutex on Linux involves reading an integer from memory.

Also, the way a queue prevents two consumers from popping off the same element is the same way a mutex is implemented.