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:
parent
0fd3dfb160
commit
2a9c640739
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue