commit | 4207f4add8ffe3e027844c36fe26b7d727e1542e | [log] [tgz] |
---|---|---|
author | Pedro Sousa <sousapedro596@gmail.com> | Tue Oct 03 22:35:05 2023 +0100 |
committer | Carles CufĂ <carles.cufi@nordicsemi.no> | Mon Oct 23 12:10:06 2023 +0200 |
tree | 7f68f551cb458cb45c2854a5d400a95df54efea1 | |
parent | afc034e29438cafbe0a4032e364f2a508fa364e8 [diff] |
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: Pedro Sousa <sousapedro596@gmail.com>