forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kernel: enhance realtime-ness when handling timeouts
The numbers of timeouts that expire on a given tick is arbitrary. When handling them, interrupts were locked, which prevented higher-priority interrupts from preempting the system clock timer handler. Instead of looping on the list of timeouts, which needs interrupts being locked since it can be manipulated at interrupt level, timeouts are dequeued one by one, unlocking interrupts between each, and put on a local 'expired' queue that is drained subsequently, with interrupts unlocked. This scheme uses the fact that no timeout can be prepended onto the timeout queue while expired timeouts are getting removed from it, since adding a timeout of 0 is prohibited. Timer handlers now run with interrupts unlocked: the previous behaviour added potentially horrible non-determinism to the handling of timeouts. Change-Id: I709085134029ea2ad73e167dc915b956114e14c2 Signed-off-by: Benjamin Walsh <[email protected]>
- Loading branch information
Showing
5 changed files
with
173 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters