From 0af3c509243c2f32b0b456a51a5278fc31ba67f7 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 9 Sep 2013 20:49:30 -0700 Subject: [PATCH] Eat cycles after creating a thread. Improves things on some tests, should be more accurate. Creating a thread sure takes a long time. --- Core/HLE/sceKernelThread.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Core/HLE/sceKernelThread.cpp b/Core/HLE/sceKernelThread.cpp index dcba26a77f..9779f15c5a 100644 --- a/Core/HLE/sceKernelThread.cpp +++ b/Core/HLE/sceKernelThread.cpp @@ -2049,6 +2049,11 @@ int __KernelCreateThread(const char *threadName, SceUID moduleID, u32 entry, u32 INFO_LOG(SCEKERNEL, "%i=sceKernelCreateThread(name=%s, entry=%08x, prio=%x, stacksize=%i)", id, threadName, entry, prio, stacksize); if (optionAddr != 0) WARN_LOG_REPORT(SCEKERNEL, "sceKernelCreateThread(name=%s): unsupported options parameter %08x", threadName, optionAddr); + + hleEatCycles(32000); + // This won't schedule to the new thread, but it may to one woken from eating cycles. + // Technically, this should not eat all at once, and reschedule in the middle, but that's hard. + hleReSchedule("thread created"); return id; }