kernel: timer: clarification on k_timer_stop_t requirements

The documentation of the callback implies it is invoked from a thread,
but the documentation of the stop function states it can be called
from interrupt context.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
This commit is contained in:
Peter A. Bigot 2020-09-21 05:34:56 -05:00 committed by Carles Cufí
commit 82a98d75ef

View file

@ -1832,7 +1832,10 @@ typedef void (*k_timer_expiry_t)(struct k_timer *timer);
* @brief Timer stop function type.
*
* A timer's stop function is executed if the timer is stopped prematurely.
* The function runs in the context of the thread that stops the timer.
* The function runs in the context of call that stops the timer. As
* k_timer_stop() can be invoked from an ISR, the stop function must be
* callable from interrupt context (isr-ok).
*
* The stop function is optional, and is only invoked if the timer has been
* initialized with one.
*