summaryrefslogtreecommitdiff
path: root/Kernel/Arch
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-09-14 19:44:22 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-09-14 20:21:10 +0200
commite1481dcb4227066974aeee49fcb349ae5c0eee4a (patch)
tree8b681edee14306dbe93fae9148a6877b9b5f9197 /Kernel/Arch
parentb35ad5b523ec8fcb2f247c1c6700af2a244115b7 (diff)
downloadserenity-e1481dcb4227066974aeee49fcb349ae5c0eee4a.zip
Kernel: Stop idling after handling an IRQ
If we receive an IRQ while the idle task is running, prevent it from re-halting the CPU after the IRQ handler returns. Instead have the idle task yield to the scheduler, so we can see if the IRQ has unblocked something.
Diffstat (limited to 'Kernel/Arch')
-rw-r--r--Kernel/Arch/i386/CPU.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Kernel/Arch/i386/CPU.cpp b/Kernel/Arch/i386/CPU.cpp
index 099b2092fb..ab9047da87 100644
--- a/Kernel/Arch/i386/CPU.cpp
+++ b/Kernel/Arch/i386/CPU.cpp
@@ -490,8 +490,10 @@ void handle_irq()
}
}
- if (s_irq_handler[irq])
+ if (s_irq_handler[irq]) {
s_irq_handler[irq]->handle_irq();
+ Scheduler::stop_idling();
+ }
PIC::eoi(irq);
}