Posted Feb 9, 2008 14:09 UTC (Sat) by willy (subscriber, #9762)
In reply to: Spinlocks by jd
Parent article: Ticket spinlocks
For N processes, you would use a semaphore initialised to N, not a spinlock. If you wanted N
cpus to be able to do something, then I guess we could introduce a counting spinlock, similar
to a semaphore. But we've not needed one yet, and I doubt we will.
We have many things implemented on top of spinlocks -- the BKL, semaphores, mutexes, rwlocks,
rwsems and the late and unlamented brwlock (obsoleted by RCU). Then there's specialised
beasts such as bitlocks and seqlocks.