mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #5268 from unknownbrackets/intr-fix
Reschedule instead of switching to delayed threads
This commit is contained in:
commit
3a8f5b6ff2
1 changed files with 9 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue