Function with_interrupts_disabled

Source
pub fn with_interrupts_disabled<F, R>(f: F) -> R
where F: FnOnce() -> R,
Expand description

Execute a closure with interrupts disabled

This is a convenience function that saves the current interrupt state, disables interrupts, executes the closure, and restores the interrupt state.