Module sync

Module sync 

Source
Expand description

Useful synchronization primitives.

Modules§

non_null
This module provides a trait and some auxiliary types to help abstract and work with non-null pointers.

Structs§

Mutex
A mutex with waitqueue.
MutexGuard
A guard that provides exclusive access to the data protected by a Mutex.
Rcu
A Read-Copy Update (RCU) cell for sharing a pointer between threads.
RcuDrop
A wrapper to delay calling destructor of T after the RCU grace period.
RcuOption
A Read-Copy Update (RCU) cell for sharing a nullable pointer.
RcuOptionReadGuard
A guard that allows access to the pointed data protected by a RcuOption.
RcuReadGuard
A guard that allows access to the pointed data protected by a Rcu.
RoArc
A reference-counting pointer with read-only capabilities.
RwArc
A reference-counting pointer with read-write capabilities.
RwLock
Spin-based Read-write Lock
RwLockReadGuard
A guard that provides immutable data access.
RwLockUpgradeableGuard
A guard that provides immutable data access but can be atomically upgraded to RwLockWriteGuard.
RwLockWriteGuard
A guard that provides mutable data access.
RwMutex
A mutex that provides data access to either one writer or many readers.
RwMutexReadGuard
A guard that provides immutable data access.
RwMutexUpgradeableGuard
A guard that provides immutable data access but can be atomically upgraded to RwMutexWriteGuard.
RwMutexWriteGuard
A guard that provides mutable data access.
SpinLock
A spin lock.
SpinLockGuard
A guard that provides exclusive access to the data protected by a SpinLock.
WaitQueue
A wait queue.
Waiter
A waiter that can put the current thread to sleep until it is woken up by the associated Waker.
Waker
A waker that can wake up the associated Waiter.

Enums§

LocalIrqDisabled
A guardian that disables IRQs while holding a lock.
PreemptDisabled
A guardian that disables preemption while holding a lock.
WriteIrqDisabled
A guardian that disables IRQs while holding a write lock.

Traits§

GuardTransfer
The Guard can be transferred atomically.
SpinGuardian
A guardian that denotes the guard behavior for holding a spin-based lock.