Function halt_cpu

Source
pub fn halt_cpu()
Expand description

Halts the CPU until interrupts if no preemption is required.

This function will return if:

  • preemption is required when calling this function,
  • preemption is required during halting the CPU, or
  • interrupts occur during halting the CPU.

This function will perform preemption before returning if preemption is required.

ยงPanics

This function will panic if it is called in the atomic mode (crate::task::atomic_mode).