mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Tlspl: Time out at once like other waits
Recorded on hardware (pspautotests threads/tls/timeout), a Tlspl allocation follows the same timeout rule as the other waits, including failing at once for 0 and 1us without writing the timeout back, which the shared rule it moved to in the last commits didn't give it yet. Before that it waited the raw timeout, ~30us short. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
1 parent
80938529a9
commit
d86896bed9
2 files changed
+3
No files matched your search
@@ -2087,6 +2087,8 @@ int _sceKernelAllocateTlspl(SceUID uid, u32 addrPtr, u32 timeoutPtr) {
|
||||
|
||||
u32 allocAddress = __KernelAllocateTls(tls);
|
||||
if (allocAddress == 0) {
|
||||
if (__KernelWaitTimesOutAtOnce(timeoutPtr))
|
||||
return hleLogDebug(Log::sceKernel, SCE_KERNEL_ERROR_WAIT_TIMEOUT, "timed out at once");
|
||||
SceUID threadID = __KernelGetCurThread();
|
||||
tls->waitingThreads.push_back(threadID);
|
||||
__KernelWaitCurThreadWithTimeout(WAITTYPE_TLSPL, uid, addrPtr, timeoutPtr, false, "allocate tls");
|
||||
|
||||
Reference in new issue
Block a user