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:
Henrik RydgårdandClaude Opus 5.5 committed 2026-09-30 09:06:30 -06:00
1 parent 80938529a9
commit d86896bed9
2 files changed
+3

No files matched your search

+2
View File
@@ -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");
+1
View File
@@ -433,6 +433,7 @@ tests_good = [
"threads/tls/free",
"threads/tls/priority",
"threads/tls/refer",
"threads/tls/timeout",
"threads/vpl/allocate",
"threads/vpl/cancel",
"threads/vpl/create",