ZXFoundation™ 26h2
Loading...
Searching...
No Matches
zxfoundation::sync::qspinlock::qspinlock Class Referenceexport

Queued spinlock — SMP-safe, cache-line-efficient. More...

Public Member Functions

auto is_locked () const noexcept -> bool
 Test whether the lock is held (non-deterministic snapshot).
auto lock () noexcept -> void
 Acquire the lock (blocking, SMP-safe).
auto lock_irqsave () noexcept -> irqflags
 Acquire the lock and save + disable IRQs atomically.
auto try_lock () noexcept -> bool
 Try to acquire the lock without blocking.
auto unlock () noexcept -> void
 Release the lock.
auto unlock_irqrestore (irqflags flags) noexcept -> void
 Release the lock and restore IRQs.

Detailed Description

Queued spinlock — SMP-safe, cache-line-efficient.

Note
Aligned to 4 bytes minimum for CS instruction operand alignment.

The documentation for this class was generated from the following files:
  • zxfoundation/sync/qspinlock.zcomponent/core.cxxm
  • zxfoundation/sync/qspinlock.zcomponent/core.cxx