summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/kernel.cpp
diff options
context:
space:
mode:
authorGravatar wwylele2016-12-16 12:33:18 +0200
committerGravatar wwylele2016-12-16 12:33:18 +0200
commit4c9b80cee389d9b2d4ff3437aa70cda2b1754382 (patch)
treeb5fb8c8be9ad32336b8aa6f8b587b0db245c749a /src/core/hle/kernel/kernel.cpp
parentMerge pull request #2260 from Subv/scheduling (diff)
downloadyuzu-4c9b80cee389d9b2d4ff3437aa70cda2b1754382.tar.gz
yuzu-4c9b80cee389d9b2d4ff3437aa70cda2b1754382.tar.xz
yuzu-4c9b80cee389d9b2d4ff3437aa70cda2b1754382.zip
Kernel: remove object's waiting thread if it is dead
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
-rw-r--r--src/core/hle/kernel/kernel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index 209d35270..1db8e102f 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -35,7 +35,8 @@ void WaitObject::RemoveWaitingThread(Thread* thread) {
35SharedPtr<Thread> WaitObject::GetHighestPriorityReadyThread() { 35SharedPtr<Thread> WaitObject::GetHighestPriorityReadyThread() {
36 // Remove the threads that are ready or already running from our waitlist 36 // Remove the threads that are ready or already running from our waitlist
37 boost::range::remove_erase_if(waiting_threads, [](const SharedPtr<Thread>& thread) { 37 boost::range::remove_erase_if(waiting_threads, [](const SharedPtr<Thread>& thread) {
38 return thread->status == THREADSTATUS_RUNNING || thread->status == THREADSTATUS_READY; 38 return thread->status == THREADSTATUS_RUNNING || thread->status == THREADSTATUS_READY ||
39 thread->status == THREADSTATUS_DEAD;
39 }); 40 });
40 41
41 // TODO(Subv): This call should be performed inside the loop below to check if an object can be 42 // TODO(Subv): This call should be performed inside the loop below to check if an object can be