3 releases
Uses old Rust 2015
0.0.2 | Feb 6, 2018 |
---|---|
0.0.1 | Feb 6, 2018 |
0.0.0 | Feb 6, 2018 |
#1224 in Hardware support
12KB
156 lines
spin-locks
spin-locks is a rust crate that provides a 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.
These locks do not provide a Mutex or a MutexGuard to automatically unlock on drop, as they do not protect a particular item of data. This is to make it easier to adapt these locks with the use of persistent memory, which is non-stack and non-heap allocated.
Licensing
The license for this project is MIT.
lib.rs
:
#spin-locks
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 BestSpinLockForCompilationTarget
.
Dependencies
~45KB