Skip to main content

free

Function free 

Source
pub unsafe fn free<R>(f: impl FnOnce(CriticalSection<'_>) -> R) -> R
Expand description

Run f with interrupts disabled, handing it proof of that.

ยงSafety

Enables interrupts on the way out however they were set on the way in: SM83 cannot read IME back, so there is nothing to restore. Calling this with interrupts already off ends the enclosing critical section early.