Reset waits when terminating a thread.

Terminated threads can't be waiting.
This commit is contained in:
Unknown W. Brackets 2013-09-09 21:39:38 -07:00
parent e19fdef0fd
commit 2577f65b80

View File

@ -1738,6 +1738,10 @@ void __KernelStopThread(SceUID threadID, int exitStatus, const char *reason)
}
}
t->waitingThreads.clear();
// Stopped threads are never waiting.
t->nt.waitType = WAITTYPE_NONE;
t->nt.waitID = 0;
}
else
ERROR_LOG_REPORT(SCEKERNEL, "__KernelStopThread: thread %d does not exist", threadID);