zephyr::raw

Function k_cpu_idle

source
pub unsafe extern "C" fn k_cpu_idle()
Expand description

@defgroup cpu_idle_apis CPU Idling APIs @ingroup kernel_apis @{ / /** @brief Make the CPU idle.

This function makes the CPU idle until an event wakes it up.

In a regular system, the idle thread should be the only thread responsible for making the CPU idle and triggering any type of power management. However, in some more constrained systems, such as a single-threaded system, the only thread would be responsible for this if needed.

@note In some architectures, before returning, the function unmasks interrupts unconditionally.