mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-15 22:54:00 +00:00
hle: kernel: KScheduler: Ensure dummy threads are never scheduled.
- These are only used by host threads for locking.
This commit is contained in:
parent
f6cbb14dce
commit
11a380c3da
1 changed files with 5 additions and 0 deletions
|
@ -739,6 +739,11 @@ void KScheduler::ScheduleImpl() {
|
||||||
next_thread = idle_thread;
|
next_thread = idle_thread;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We never want to schedule a dummy thread, as these are only used by host threads for locking.
|
||||||
|
if (next_thread->GetThreadType() == ThreadType::Dummy) {
|
||||||
|
next_thread = idle_thread;
|
||||||
|
}
|
||||||
|
|
||||||
// If we're not actually switching thread, there's nothing to do.
|
// If we're not actually switching thread, there's nothing to do.
|
||||||
if (next_thread == current_thread.load()) {
|
if (next_thread == current_thread.load()) {
|
||||||
previous_thread->EnableDispatch();
|
previous_thread->EnableDispatch();
|
||||||
|
|
Loading…
Reference in a new issue