VERY experimental Nintendo Switch 2 emulator
C++
Kernel: remove object's waiting thread if it is dead
wwyleleea4217939a87
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cppindex 209d35270d..1db8e102f0 100644--- a/src/core/hle/kernel/kernel.cpp+++ b/src/core/hle/kernel/kernel.cpp@@ -35,7 +35,8 @@ void WaitObject::RemoveWaitingThread(Thread* thread) {SharedPtr<Thread> WaitObject::GetHighestPriorityReadyThread() {// Remove the threads that are ready or already running from our waitlistboost::range::remove_erase_if(waiting_threads, [](const SharedPtr<Thread>& thread) {- return thread->status == THREADSTATUS_RUNNING || thread->status == THREADSTATUS_READY;+ return thread->status == THREADSTATUS_RUNNING || thread->status == THREADSTATUS_READY ||+ thread->status == THREADSTATUS_DEAD;});// TODO(Subv): This call should be performed inside the loop below to check if an object can be