Skip to main content

with_exclusive_cpu

Function with_exclusive_cpu 

Source
pub unsafe fn with_exclusive_cpu<R>(
    pin: &CpuPin<'_>,
    operation: impl for<'exclusive> FnOnce(&ExclusiveCpu<'exclusive>) -> R,
) -> R
Expand description

Runs operation with exclusive access to mutable state on the pinned CPU.

ยงSafety

The caller must prevent migration, local IRQ/re-entry, and conflicting remote access for the complete callback. pin must be covered by the same guard that establishes those conditions.