doc: reference: kernel: remove inconsistent comment for k_cpu_idle

k_cpu_idle() API does not need to be invoked with interrupts
unlocked; it is actually invoked with interrupts locked by
the kernel CPU idling mechanism. In most architectures, the
function is, actually, un-locking interrupts itself. We need
to remove this comment from the documentation of the CPU
idle API. We add a note about the un-locking of interrupts.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
Ioannis Glaropoulos 2020-03-17 15:49:05 +01:00
commit b61ba8df4a

View file

@ -25,8 +25,9 @@ Making the CPU idle
=================== ===================
Making the CPU idle is simple: call the k_cpu_idle() API. The CPU will stop Making the CPU idle is simple: call the k_cpu_idle() API. The CPU will stop
executing instructions until an event occurs. Make sure interrupts are not executing instructions until an event occurs. Most likely, the function will
locked before invoking it. Most likely, it will be called within a loop. be called within a loop. Note that in certain architectures, upon return,
k_cpu_idle() unconditionally unmasks interrupts.
.. code-block:: c .. code-block:: c