Zephyr API 3.6.99
|
Functions | |
static void | k_cpu_idle (void) |
Make the CPU idle. | |
static void | k_cpu_atomic_idle (unsigned int key) |
Make the CPU idle in an atomic fashion. | |
|
inlinestatic |
#include <zephyr/kernel.h>
Make the CPU idle in an atomic fashion.
Similar to k_cpu_idle(), but must be called with interrupts locked.
Enabling interrupts and entering a low-power mode will be atomic, i.e. there will be no period of time where interrupts are enabled before the processor enters a low-power mode.
After waking up from the low-power mode, the interrupt lockout state will be restored as if by irq_unlock(key).
key | Interrupt locking key obtained from irq_lock(). |
|
inlinestatic |
#include <zephyr/kernel.h>
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.