hal::critical_section
Critical section trait.
A token-based critical section masks interrupts up to a configurable priority threshold. Not all interrupts are masked — real-time properties are preserved for high-priority events. The token restores the previous interrupt state when dropped.
Traits
Section titled “Traits”CriticalSection
Section titled “CriticalSection”trait CriticalSection { fn enter() -> Self::Token}A critical section implementation.
CriticalSectionToken
Section titled “CriticalSectionToken”trait CriticalSectionToken { fn release(self)}Opaque token whose drop restores the previous interrupt state.