sched: Call irq_poll() at start of run_tasks() loop

On architectures that poll for irqs, check for any pending irqs prior
to checking if tasks are idle.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-04-19 22:50:30 -04:00
parent 3d37362d6e
commit 92fe116dc7
1 changed files with 1 additions and 0 deletions

View File

@ -226,6 +226,7 @@ run_tasks(void)
uint32_t start = timer_read_time(); uint32_t start = timer_read_time();
for (;;) { for (;;) {
// Check if can sleep // Check if can sleep
irq_poll();
if (tasks_status != TS_REQUESTED) { if (tasks_status != TS_REQUESTED) {
start -= timer_read_time(); start -= timer_read_time();
irq_disable(); irq_disable();