mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 17:53:42 +01:00
Stop practicing thread necromancy.
This commit is contained in:
1 parent
61896cd00a
commit
1c51564896
1 file changed
+2
-4
@@ -2951,8 +2951,7 @@ void Thread::resumeFromWait()
|
||||
if (action)
|
||||
{
|
||||
action->status &= ~THREADSTATUS_WAIT;
|
||||
// TODO: What if DORMANT or DEAD?
|
||||
if (!(action->status & THREADSTATUS_WAITSUSPEND))
|
||||
if (!(action->status & (THREADSTATUS_WAITSUSPEND | THREADSTATUS_DORMANT | THREADSTATUS_DEAD)))
|
||||
action->status = THREADSTATUS_READY;
|
||||
|
||||
// Non-waiting threads do not process callbacks.
|
||||
@@ -2961,8 +2960,7 @@ void Thread::resumeFromWait()
|
||||
else
|
||||
{
|
||||
this->nt.status &= ~THREADSTATUS_WAIT;
|
||||
// TODO: What if DORMANT or DEAD?
|
||||
if (!(this->nt.status & THREADSTATUS_WAITSUSPEND))
|
||||
if (!(this->nt.status & (THREADSTATUS_WAITSUSPEND | THREADSTATUS_DORMANT | THREADSTATUS_DEAD)))
|
||||
__KernelChangeReadyState(this, this->GetUID(), true);
|
||||
|
||||
// Non-waiting threads do not process callbacks.
|
||||
|
||||
Reference in new issue
Block a user