pub fn with_interrupts_disabled<F, R>(f: F) -> Rwhere
F: FnOnce() -> R,
Expand description
Execute closure without allowing any interrupts on the current core.
This function ensures interrupts are disabled before invoking the given
closue f
. This allows / you to safely perform single-core operations
which would otherwise race against interrupt handlers.