Don't resume sleeping/etc. threads after cbs.

This could happen in a few cases, including the cb affecting its
own wait status.
This commit is contained in:
Unknown W. Brackets committed 2012-12-09 21:40:03 -08:00
1 parent a218dcc0f0
commit 36fb1a8392
1 file changed
+3 -2
+3 -2
View File
@@ -1853,8 +1853,9 @@ void __KernelReturnFromMipsCall()
if (!__KernelExecutePendingMipsCalls(call->reschedAfter))
{
// Sometimes, we want to stay on the thread.
if (call->reschedAfter)
hleReSchedule("return from callback");
int threadReady = currentThread->nt.status & (THREADSTATUS_READY | THREADSTATUS_RUNNING);
if (call->reschedAfter || threadReady == 0)
__KernelReSchedule("return from callback");
}
}