Skip to content
Commit 5986ec04 authored by Benjamin Walsh's avatar Benjamin Walsh Committed by Andrew Boie
Browse files

arc: fix race condition when returning from interrupt



A race condition would happend if a FIRQ interrupted a
return-from-interrupt from a RIRQ at the wrong moment: if a decision was
already taken which thread to context switch in and the FIRQ woke up
another thread of higher priority, the ready queue would be corrupted.

The solution is to lock interrupts at the moment the interrupt return
code starts looking at the kernel queues. Interrupts do not need to be
unlocked before exiting: the return-from-interrupt (rtie) instruction
will restore the correct interrupt locking state for the thread being
context switched in.

Change-Id: I777665c2faeca7b1f2a77ddd9ee2a520080bae88
Signed-off-by: default avatarBenjamin Walsh <benjamin.walsh@windriver.com>
parent 84a92048
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment