early-access version 2415

This commit is contained in:
pineappleEA
2022-01-19 04:17:57 +01:00
parent 495ed56df7
commit afb206da79
11 changed files with 83 additions and 26 deletions

View File

@@ -1097,14 +1097,14 @@ void KThread::EndWait(ResultCode wait_result_) {
// Lock the scheduler.
KScopedSchedulerLock sl(kernel);
// Dummy threads are just used by host threads for locking, and will never have a wait_queue.
if (thread_type == ThreadType::Dummy) {
ASSERT_MSG(false, "Dummy threads should never call EndWait!");
return;
}
// If we're waiting, notify our queue that we're available.
if (GetState() == ThreadState::Waiting) {
if (wait_queue == nullptr) {
// This should never happen, but avoid a hard crash below to get this logged.
ASSERT_MSG(false, "wait_queue is nullptr!");
return;
}
wait_queue->EndWait(this, wait_result_);
}
}