kernel/idle: Replace stolen IRQ lock
The removal of the abort handling also absconded with an IRQ lock that is required for reliable operation in the idle loop. Put it back. Once the idle loop has made a decision to enter idle, any interrupt that arrives needs to be masked and delivered AFTER the system enters idle. Otherwise we run the risk of races where the system accepts and processes an interrupt that should have prevented idle, but then goes to sleep anyway having already made the decision. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
098fce351f
commit
39a8f3b4f9
|
@ -135,6 +135,8 @@ void idle(void *p1, void *unused2, void *unused3)
|
|||
k_yield();
|
||||
#else
|
||||
|
||||
(void) arch_irq_lock();
|
||||
|
||||
#ifdef CONFIG_SYS_CLOCK_EXISTS
|
||||
int32_t ticks = z_get_next_timeout_expiry();
|
||||
|
||||
|
|
Loading…
Reference in a new issue