mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-03 17:02:56 +00:00
Kernel: Mark the idle thread as active before switching it in
Otherwise, our code for dumping all thread stacks gets confused if it finds a thread that is in a 'running' state, but that isn't marked active.
This commit is contained in:
parent
20f2389e2a
commit
50b7183bd1
Notes:
sideshowbarker
2024-07-17 01:27:18 +09:00
Author: https://github.com/timschumi
Commit: 50b7183bd1
Pull-request: https://github.com/SerenityOS/serenity/pull/18413
Reviewed-by: https://github.com/Panky-codes
1 changed files with 4 additions and 1 deletions
|
@ -99,7 +99,10 @@ Thread& Scheduler::pull_next_runnable_thread()
|
|||
}
|
||||
priority_mask &= ~(1u << priority);
|
||||
}
|
||||
return *Processor::idle_thread();
|
||||
|
||||
auto* idle_thread = Processor::idle_thread();
|
||||
idle_thread->set_active(true);
|
||||
return *idle_thread;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue