mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
Kernel: Break out of the idle loop on WaitQueue wake instead of on IRQ
Now that we have proper wait queues to drive waiter wakeup, we can use the wake actions to break out of the scheduler's idle loop when we've got a thread to run.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user