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 2012-12-09 21:10:55 -08:00
parent a218dcc0f0
commit 36fb1a8392

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");
}
}