Merge pull request #5268 from unknownbrackets/intr-fix

Reschedule instead of switching to delayed threads
This commit is contained in:
Henrik Rydgård 2014-01-29 01:55:47 -08:00
commit 3a8f5b6ff2

View file

@ -1361,8 +1361,11 @@ bool __KernelSwitchToThread(SceUID threadID, const char *reason)
u32 error;
Thread *t = kernelObjects.Get<Thread>(threadID, error);
if (!t)
ERROR_LOG(SCEKERNEL, "__KernelSwitchToThread: %x doesn't exist", threadID)
else
{
ERROR_LOG_REPORT(SCEKERNEL, "__KernelSwitchToThread: %x doesn't exist", threadID);
hleReSchedule("switch to deleted thread");
}
else if (t->isReady() || t->isRunning())
{
Thread *current = __GetCurrentThread();
if (current && current->isRunning())
@ -1371,6 +1374,10 @@ bool __KernelSwitchToThread(SceUID threadID, const char *reason)
__KernelSwitchContext(t, reason);
return true;
}
else
{
hleReSchedule("switch to waiting thread");
}
return false;
}