mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-11 07:03:33 +02:00
Resume dispatch on thread start.
This commit is contained in:
@@ -26,8 +26,9 @@
|
||||
#include "../MIPS/MIPSInt.h"
|
||||
#include "../MIPS/MIPSCodeUtils.h"
|
||||
#include "../MIPS/MIPS.h"
|
||||
#include "../../Core/CoreTiming.h"
|
||||
#include "../../Core/MemMap.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/MemMap.h"
|
||||
#include "Core/Reporting.h"
|
||||
#include "ChunkFile.h"
|
||||
|
||||
#include "sceAudio.h"
|
||||
@@ -1565,9 +1566,18 @@ int sceKernelStartThread(SceUID threadToStartID, u32 argSize, u32 argBlockPtr)
|
||||
// Smaller is better for priority. Only switch if the new thread is better.
|
||||
if (cur && cur->nt.currentPriority > startThread->nt.currentPriority)
|
||||
{
|
||||
// Starting a thread automatically resumes the dispatch thread.
|
||||
// TODO: Maybe this happens even for worse-priority started threads?
|
||||
dispatchEnabled = true;
|
||||
|
||||
__KernelChangeReadyState(currentThread, true);
|
||||
hleReSchedule("thread started");
|
||||
}
|
||||
else if (!dispatchEnabled)
|
||||
{
|
||||
WARN_LOG(HLE, "UNTESTED Dispatch disabled while starting worse-priority thread");
|
||||
Reporting::ReportMessage("UNTESTED Dispatch disabled while starting worse-priority thread");
|
||||
}
|
||||
__KernelChangeReadyState(startThread, threadToStartID, true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user