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
An efficient, CAS-free unfair spin lock that uses an atomic fetch OR and only requires one byte of memory.
An efficient, CAS-free unfair spin lock that uses an atomic exchange and only requires one byte of memory.
Traits
A spin-lock API.
Functions
On x86_64
, issues a REP NOP
which cause the CPU to potentially yield to another HyperThread
.
Type Definitions
The best spin lock for the compilation target.