Skip to content
Snippets Groups Projects
Commit 4c9b80ce authored by wwylele's avatar wwylele
Browse files

Kernel: remove object's waiting thread if it is dead

parent cda7210f
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,8 @@ void WaitObject::RemoveWaitingThread(Thread* thread) {
SharedPtr<Thread> WaitObject::GetHighestPriorityReadyThread() {
// Remove the threads that are ready or already running from our waitlist
boost::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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment