kernel: k_timer_stop: remove assert when called from an ISR
Change-Id: I596e0323a7aafc9d7f3834a8d1b655ad2540d4ef Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
c2a91b1b2e
commit
4fb12ae988
2 changed files with 3 additions and 2 deletions
|
@ -932,6 +932,9 @@ extern void k_timer_start(struct k_timer *timer,
|
||||||
* Attempting to stop a timer that is not running is permitted, but has no
|
* Attempting to stop a timer that is not running is permitted, but has no
|
||||||
* effect on the timer.
|
* effect on the timer.
|
||||||
*
|
*
|
||||||
|
* @note Can be called by ISRs. The stop handler has to be callable from ISRs
|
||||||
|
* if @a k_timer_stop is to be called from ISRs.
|
||||||
|
*
|
||||||
* @param timer Address of timer.
|
* @param timer Address of timer.
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
|
|
|
@ -131,8 +131,6 @@ void k_timer_start(struct k_timer *timer, int32_t duration, int32_t period)
|
||||||
|
|
||||||
void k_timer_stop(struct k_timer *timer)
|
void k_timer_stop(struct k_timer *timer)
|
||||||
{
|
{
|
||||||
__ASSERT(!_is_in_isr(), "");
|
|
||||||
|
|
||||||
int key = irq_lock();
|
int key = irq_lock();
|
||||||
int inactive = (_abort_timeout(&timer->timeout) == _INACTIVE);
|
int inactive = (_abort_timeout(&timer->timeout) == _INACTIVE);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue