Skip to content
Commit 3b52bc7b authored by Pedro Sousa's avatar Pedro Sousa Committed by Fabio Baltieri
Browse files

kernel: timer: Fix race condition in k_timer_start



The documentation suggests that k_timer_start can be invoked from ISR
and preemptive contexts, however, an assertion failure occurs if one
k_timer_start call preempts another for the same timer instance. This
commit mitigates the issue by implementing a spinlock throughout the
k_timer_start function, ensuring thread-safety.

Fixes: #62908

Signed-off-by: default avatarPedro Sousa <sousapedro596@gmail.com>
(cherry picked from commit 4207f4ad)
parent a2bb8494
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment