What is a spinlock?
Posted Jan 30, 2003 22:54 UTC (Thu) by
corbet (editor, #1)
In reply to:
What is a spinlock? by perlid
Parent article:
Fast reader/writer locks
A spinlock is a lightweight lock with no wait queues; if there is contention for the lock one (or more) threads will "spin" (busy-wait) until the lock is free. They are usually built with some sort of atomic test-and-set instruction; a quick look in the kernel source will show how they are done for any particular architecture.
(
Log in to post comments)