From e1481dcb4227066974aeee49fcb349ae5c0eee4a Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 14 Sep 2019 19:44:22 +0200 Subject: 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. --- Kernel/Arch/i386/CPU.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Kernel/Arch') 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); } -- cgit v1.2.3