Browse Source
When a timer is restarted from a high priority interrupt, it may happen that the timer is re-added to the timeout list right after it is removed from that list prior to execution of its expiration handler but before that execution actually occurs. This leads to an assertion failure reported for `z_add_timeout()` because then that function, called from `z_timer_expiration_handler()` for periodic timers, turns out to be adding a timeout that is already added to the timeout list. This commit detects such situation in `z_timer_expiration_handler()` and makes that function exit immediately when that occurs (as the timer was restared, its expiration handler should not be executed). Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>pull/54596/head
1 changed files with 18 additions and 0 deletions
Loading…
Reference in new issue