early-access version 2413

This commit is contained in:
pineappleEA
2022-01-18 04:57:01 +01:00
parent d3391096b9
commit 495ed56df7
8 changed files with 29 additions and 32 deletions

View File

@@ -739,6 +739,12 @@ void KScheduler::ScheduleImpl() {
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) {
ASSERT_MSG(false, "Dummy threads should never be scheduled!");
next_thread = idle_thread;
}
// If we're not actually switching thread, there's nothing to do.
if (next_thread == current_thread.load()) {
previous_thread->EnableDispatch();