kernel: Add timeout_lock usage notes
Adds a note about the timeout_lock to aid future developers in following the rules to help prevent deadlocks involving the timeout and scheduler spinlocks. Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
This commit is contained in:
parent
995ad43851
commit
90e2498982
1 changed files with 4 additions and 0 deletions
|
@ -16,6 +16,10 @@ static uint64_t curr_tick;
|
|||
|
||||
static sys_dlist_t timeout_list = SYS_DLIST_STATIC_INIT(&timeout_list);
|
||||
|
||||
/*
|
||||
* The timeout code shall take no locks other than its own (timeout_lock), nor
|
||||
* shall it call any other subsystem while holding this lock.
|
||||
*/
|
||||
static struct k_spinlock timeout_lock;
|
||||
|
||||
#define MAX_WAIT (IS_ENABLED(CONFIG_SYSTEM_CLOCK_SLOPPY_IDLE) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue