diff --git a/Kernel/Arch/i386/CPU.cpp b/Kernel/Arch/i386/CPU.cpp index 1b88059ade..df0c4f30af 100644 --- a/Kernel/Arch/i386/CPU.cpp +++ b/Kernel/Arch/i386/CPU.cpp @@ -3,7 +3,6 @@ #include "IRQHandler.h" #include "PIC.h" #include "Process.h" -#include "Scheduler.h" #include #include #include @@ -507,10 +506,8 @@ 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); } diff --git a/Kernel/WaitQueue.cpp b/Kernel/WaitQueue.cpp index 502027367a..8531b57cdb 100644 --- a/Kernel/WaitQueue.cpp +++ b/Kernel/WaitQueue.cpp @@ -22,6 +22,7 @@ void WaitQueue::wake_one() return; if (auto* thread = m_threads.take_first()) thread->wake_from_queue(); + Scheduler::stop_idling(); } void WaitQueue::wake_all() @@ -31,4 +32,5 @@ void WaitQueue::wake_all() return; while (!m_threads.is_empty()) m_threads.take_first()->wake_from_queue(); + Scheduler::stop_idling(); }