Struct spin_locks::IntelTsxHleSpinLock
[−]
[src]
pub struct IntelTsxHleSpinLock(_);
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/
Trait Implementations
impl Debug for IntelTsxHleSpinLock
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Default for IntelTsxHleSpinLock
[src]
impl SpinLock for IntelTsxHleSpinLock
[src]
fn acquire_spin_lock(&self)
[src]
Returns true if acquired spin lock.
fn try_to_acquire_spin_lock(&self) -> bool
[src]
Returns true if acquired spin lock.
fn unlock_spin_lock(&self)
[src]
Unlocks the spin lock.
fn is_locked(&self) -> bool
[src]
Returns true if locked (but not necessarily by this thread).
fn is_unlocked(&self) -> bool
[src]
Returns true if unlocked.
fn forcibly_unlock_spin_lock(&self)
[src]
Forcibly unlocks the spin lock, even if it is currently unlocked. Useful for working with persistent memory. Read more