Module swiss_army_knife::hardware_optimized_spin_lock [−][src]
Expand description
Spin lock.
An Intel hardware-optimized spin lock that uses Hardware Lock Elision (HLE) and a non-CAS based spin lock (an OR lock) as a fast fallback.
The intel spin lock, HardwareLockElisionSpinLock
, is only available on a x86_64
targets.
To pick the best spin lock for the compilation target, use the type alias BestForCompilationTargetSpinLock
.
Structs
AtomicBoolSpinLock | An efficient, CAS-free unfair spin lock that uses an atomic fetch OR and only requires one byte of memory. |
IntelHardwareOptimizedLockSpinLock | An efficient, CAS-free unfair spin lock that uses an atomic exchange and only requires one byte of memory. |
Traits
SpinLock | A spin-lock API. |
Functions
busy_wait_spin_loop_hint | On |
Type Definitions
BestForCompilationTargetSpinLock | The best spin lock for the compilation target. |