pub unsafe trait InAtomicMode: Debug { }
Expand description
A marker trait for guard types that enforce the atomic mode.
Key kernel primitives such as SpinLock
and Rcu
rely on
the atomic mode for correctness or soundness.
The existence of such a guard guarantees that the current task is executing
in the atomic mode.
It requires core::fmt::Debug
by default to make it easier to derive
Debug
for types with &dyn InAtomicMode
.
§Safety
The implementer must ensure that the atomic mode is maintained while the guard type is alive.
Trait Implementations§
Source§impl AsAtomicModeGuard for dyn InAtomicMode + '_
impl AsAtomicModeGuard for dyn InAtomicMode + '_
Source§fn as_atomic_mode_guard(&self) -> &dyn InAtomicMode
fn as_atomic_mode_guard(&self) -> &dyn InAtomicMode
Returns a guard for the atomic mode.
Source§impl PinCurrentCpu for dyn InAtomicMode + '_
impl PinCurrentCpu for dyn InAtomicMode + '_
Source§fn current_cpu(&self) -> CpuId
fn current_cpu(&self) -> CpuId
Returns the ID of the current CPU.