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.
- Mutex
Guard - A guard that provides exclusive access to the data protected by a
Mutex. - Once
Impl - A synchronization primitive which can nominally be written to only once.
- RoArc
- A reference-counting pointer with read-only capabilities.
- RwArc
- A reference-counting pointer with read-write capabilities.
- RwLock
- Spin-based Read-write Lock
- RwLock
Read Guard - A guard that provides immutable data access.
- RwLock
Upgradeable Guard - A guard that provides immutable data access but can be atomically
upgraded to
RwLockWriteGuard. - RwLock
Write Guard - A guard that provides mutable data access.
- RwMutex
- A mutex that provides data access to either one writer or many readers.
- RwMutex
Read Guard - A guard that provides immutable data access.
- RwMutex
Upgradeable Guard - A guard that provides immutable data access but can be atomically
upgraded to
RwMutexWriteGuard. - RwMutex
Write Guard - A guard that provides mutable data access.
- Spin
Lock - A spin lock.
- Spin
Lock Guard - A guard that provides exclusive access to the data protected by a
SpinLock. - Trivial
Pred - A trivial predicate that holds for any value.
Use with
OnceImplwhen no invariant is needed. - Wait
Queue - 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§
- Local
IrqDisabled - A guardian that disables IRQs while holding a lock.
- Preempt
Disabled - A guardian that disables preemption while holding a lock.
Traits§
- Guard
Transfer - The Guard can be transferred atomically.
- Spin
Guardian - A guardian that denotes the guard behavior for holding a spin-based lock.