diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-08-01 19:32:16 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-08-01 19:33:36 +0200 |
commit | 09cd3a7a0734403050594d7a135f206baf03363d (patch) | |
tree | 4d5299a19045e24f7c4d33caa26877b217067c0c | |
parent | 38c80d5e6d214bcc3a2078d752d1eb3975297e6a (diff) | |
download | serenity-09cd3a7a0734403050594d7a135f206baf03363d.zip |
Scheduler: Fix deadlock when first scheduling candidate being inspected
Somewhat reproducible by opening ProcessManager and trying to view the
stacks for WindowServer.
Regressed in 53262cd08b08f3d4d2b77cff9c348e84b1bf5eb9.
-rw-r--r-- | Kernel/Scheduler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Scheduler.cpp b/Kernel/Scheduler.cpp index 10b1f899f8..978d889041 100644 --- a/Kernel/Scheduler.cpp +++ b/Kernel/Scheduler.cpp @@ -396,7 +396,7 @@ bool Scheduler::pick_next() auto* previous_head = runnable_list.first(); for (;;) { // Move head to tail. - runnable_list.append(*previous_head); + runnable_list.append(*runnable_list.first()); auto* thread = runnable_list.first(); if (!thread->process().is_being_inspected() && (thread->state() == Thread::Runnable || thread->state() == Thread::Running)) { |