Re:Linus Torvalds on semaphores (1999)
by WallWextra on Wednesday December 17, 2014 @08:37AM
(#8762223)
Semaphores are basically unused in the kernel these days, abandoned in favor of mutexes. I really recommend reading kernel/locking/mutex.c. You can learn a lot about the details of low-level synchronization, and it's also just a really impressive piece of ruthlessly-optimised code. Tricks like reading the lock's 'owner' field without any sort of synchronization, to decide whether to spin on the lock or to sleep.
[ Parent
| on HN ]
For the sake of completeness: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux....