kernel: timer: Call user handler without spinlock
Add spinlock unlocking before calling timer expiration
handler. Locking was introduced by dde3d6c
.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
02c32d4474
commit
8979fbc906
|
@ -43,7 +43,10 @@ void z_timer_expiration_handler(struct _timeout *t)
|
|||
|
||||
/* invoke timer expiry function */
|
||||
if (timer->expiry_fn != NULL) {
|
||||
/* Unlock for user handler. */
|
||||
k_spin_unlock(&lock, key);
|
||||
timer->expiry_fn(timer);
|
||||
key = k_spin_lock(&lock);
|
||||
}
|
||||
|
||||
if (!IS_ENABLED(CONFIG_MULTITHREADING)) {
|
||||
|
|
Loading…
Reference in a new issue