mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-27 04:08:37 +01:00
When starting a thread, put old thread at end.
This matters so the right thread is run later when scheduling switches back.
This commit is contained in:
1 parent
0fd3dfb160
commit
2a9c640739
1 file changed
+3
-1
@@ -1614,7 +1614,9 @@ int sceKernelStartThread(SceUID threadToStartID, u32 argSize, u32 argBlockPtr)
|
||||
// TODO: Maybe this happens even for worse-priority started threads?
|
||||
dispatchEnabled = true;
|
||||
|
||||
__KernelChangeReadyState(currentThread, true);
|
||||
if (cur && cur->isRunning())
|
||||
cur->nt.status &= ~THREADSTATUS_RUNNING;
|
||||
__KernelChangeReadyState(cur, currentThread, true);
|
||||
hleReSchedule("thread started");
|
||||
}
|
||||
else if (!dispatchEnabled)
|
||||
|
||||
Reference in new issue
Block a user