Crate spin_locks [−] [src]
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,
IntelTsxHleSpinLock, is only available on x86 and x86_64 targets.
To pick the best spin lock for the compilation target, use the type alias
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. Uses Intel TSX Hardware Lock Elision (which should be backwards compatible) to create a spin lock. Inspiration from https://github.com/cyfdecyf/spinlock, https://software.intel.com/en-us/articles/tsx-anti-patterns-in-lock-elision-code and http://locklessinc.com/articles/locks/
A spin-lock API.
The best spin lock for the compilation target.