Crate preemption
source ·Expand description
Manages preemption on a per-CPU basis.
Supports enabling and disabling preemption for the purpose of safe task state management, e.g., through preemption-safe locks.
Structs
- A guard type that ensures preemption is disabled as long as it is held.
Functions
- Prevents preemption (preemptive task switching) from occurring until the returned guard object is dropped.
- Returns
true
if preemption is currently enabled on this CPU.