Module sync42::spin_lock

source ·
Expand description

An efficient FIFO spin lock. Threads will contend in much the same way as an MCU lock, relying on the caching system to shoot down the cache line when it gets written.

Structs§

  • SpinLock provides fast synchronization where blocking threads would be too costly. Use only for situations where a small, countable number of operations happen under lock.
  • A guard on an active spinlock.