pub unsafe fn enable_and_halt()Expand description
Sleep until an interrupt arrives, then service it.
Emits ei and halt as one pair: ei takes effect only after the next
instruction, so an interrupt cannot be serviced in between and leave the halt
waiting for the following one.
ยงSafety
Introduces preemption, breaking code that assumes interrupts stay off.