From 8b583acf23dd25ea771857c61a0723d17945f3aa Mon Sep 17 00:00:00 2001 From: Andy Ross Date: Wed, 30 Jan 2019 12:31:25 -0800 Subject: [PATCH] kernel/timeout: Fix another recursive spinlock() The fix in commit e664c78b8297 ("kernel/timeout: Fix recursive spinlock in z_set_timeout_expiry()") missed a spot that had also been introduced with recent locking work. The new _get_next_timeout_expiry() implementation takes its own lock, which is recursive when called from z_clock_announce(). Fix by calling the wrapped implementation instead. Signed-off-by: Andy Ross --- kernel/timeout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/timeout.c b/kernel/timeout.c index 2c4db74dab1..25107a972e3 100644 --- a/kernel/timeout.c +++ b/kernel/timeout.c @@ -198,7 +198,7 @@ void z_clock_announce(s32_t ticks) curr_tick += announce_remaining; announce_remaining = 0; - z_clock_set_timeout(_get_next_timeout_expiry(), false); + z_clock_set_timeout(next_timeout(), false); k_spin_unlock(&timeout_lock, key); }