Thread: Auto-resume dispatch for worse threads.

Seems this doesn't happen when you start a better priority thread, pretty
reproducibly.
This commit is contained in:
Unknown W. Brackets 2016-05-30 20:07:28 -07:00
parent 197f3393df
commit 8df298f622

View File

@ -2015,8 +2015,11 @@ int __KernelStartThread(SceUID threadToStartID, int argSize, u32 argBlockPtr, bo
hleReSchedule("thread started");
}
// Starting a thread automatically resumes the dispatch thread.
dispatchEnabled = true;
// Starting a thread automatically resumes the dispatch thread if the new thread has worse priority.
// Seems strange but also seems reproducible.
if (cur && cur->nt.currentPriority <= startThread->nt.currentPriority) {
dispatchEnabled = true;
}
__KernelChangeReadyState(startThread, threadToStartID, true);