microZEUS
The whole stack, hand-drawn.

◄ Wiki / OS

acquire / release

The two paired steps of taking and giving back a lock, with memory-ordering guarantees.

When a thread acquires a lock it gains exclusive access to shared data; when it releases the lock it hands access back. These operations also carry memory-ordering semantics: an acquire ensures later reads see everything written before the matching release, keeping threads' views consistent. Getting this ordering wrong is a classic source of subtle concurrency bugs, so every acquire of a spinlock must be correct.

See also

  • atomicAn operation that happens all at once, with no chance for another thread to interrupt it midway.
  • barrierA synchronization point that makes parallel work wait until everyone reaches it or memory is consistent.

Referenced by

atomic · barrier