Commit Graph
43 Commits
Author SHA1 Message Date
StoneDC 3198588572 fix(libSceUlt): validate status outputs against firmware observations 2026-10-26 22:06:56 +08:00
StoneDC e6e2b47989 fix(libSceUlt): reject null worker array with nonzero capacity
sceUltGetUlthreadRuntimeInfo returned success when workerThreads was null and workerCapacity was nonzero, while rejecting the same null/nonzero-capacity combination on ulthreads with ULT_ERROR_NULL. Reject null workerThreads with nonzero capacity before touching info, and add test coverage checking the error result and that info is left untouched.
2026-10-26 22:06:56 +08:00
StoneDC 08fd4fe766 fix(libSceUlt): separate blocked queue pushers from poppers
sceUltGetQueueInfo reported every blocked queue thread as a waiting popper because both directions incremented one counter. Track the two wait classes in separate fields and fill both query outputs, copy one waiter record per blocked thread, and cover full-queue and empty-queue waits with a new queue-waiters test. sceUltGetUlthreadRuntimeInfo now throws when a caller asks for worker thread handles, since this runtime starts no worker threads, and the debt entry records the remaining limitations.
2026-10-26 22:06:56 +08:00
StoneDC 3003984952 feat(libSceUlt): implement status query exports 2026-10-26 22:06:56 +08:00
Ondra97 a6a2c89101 Merge remote-tracking branch 'origin/main' into codex/pr9621-review-20261025 2026-10-25 21:56:19 +01:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
orezraeyandClaude Opus 5.5 3d4fadbcae fix(libSceUlt): keep ulthread names within the pthread name limit
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 12:23:42 -03:00
StoneDC 35d36eabbc feat(libSceUlt): implement sceUltConditionVariableCreate and condition variable option initializers 2026-10-22 21:57:38 +08:00
Ondra97 175b8128a9 fix(ult): preserve sync objects if finalization allocation fails 2026-10-22 06:41:27 +02:00
boykopovar a6dcea9279 Merge pull request #9137 from boykopovar/fix/funcs-abi-debt-2026-10-20
fix(libs): libs funcs abi debt 2026 10 20
Corrected signatures or behaviour of 1,702 existing exported functions across 96 libraries. Added 85 typed export wrappers. Unimplemented functions retain NotImplemented_nid_no_patch(__func__).
2026-10-22 00:32:11 +03:00
boykopovar c54adfb288 fix(ult): restore thread diagnostic context and fiber callback type 2026-10-21 21:55:09 +03:00
boykopovar 1196f48d74 fix(ult): restore semaphore count bits and validation order 2026-10-21 21:53:26 +03:00
boykopovar 2053461e93 fix(ult): validate creation options and work area contracts 2026-10-21 21:53:25 +03:00
boykopovar 3f3944a0ae fix(ult): restore active object destruction error codes 2026-10-21 21:53:06 +03:00
boykopovar 574cf2943a fix(ult): enforce mutex recursion and unlock ownership 2026-10-21 21:53:03 +03:00
boykopovar 4c3c1345d7 fix(ult): restore runtime work area sizing 2026-10-21 21:53:02 +03:00
boykopovar ab82651700 fix(ult): restore mutex option layout and validation 2026-10-21 21:53:02 +03:00
boykopovar 0a603c9634 fix(ult): restore resource pool work area formulas 2026-10-21 21:53:01 +03:00
boykopovar e2a2427c69 fix(ult): remove nonexistent creation version arguments 2026-10-21 21:53:01 +03:00
boykopovar b469744334 fix(ult): match running thread and runtime destruction errors 2026-10-21 21:50:08 +03:00
boykopovar 7d14ba91a4 fix(ult): define diagnostic layouts and output arguments 2026-10-21 21:50:07 +03:00
boykopovar e544f181d1 fix(ult): recover synchronization and ulthread signatures 2026-10-21 21:50:06 +03:00
xXPBSXxandClaude Sonnet 5.5 61fca3ae9b fix(libSceUlt): keep the reader-writer lock state alive until sceUltReaderWriterLockDestroy has unlocked it
Destroy locked the state's mutex through a reference into the map entry and
then erased the entry. When that held the last shared_ptr, the state was
freed before the lock guard unlocked its mutex. Take a shared_ptr copy
before the guard so the state outlives it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-21 15:28:50 +02:00
xdCloudy 5a6128fa72 feat(libSceUlt): declare pending PS5 exports 2026-10-21 08:01:07 +01:00
Yossi Yadgar 80d00b3f15 feat(libSceUlt): implement sceUltUlthreadGetSelf, sceUltUlthreadYield and sceUltUlthreadExit
An ulthread runs on its own guest thread, so it remembers its object for sceUltUlthreadGetSelf, yields that thread, and exits it with the status sceUltUlthreadJoin and sceUltUlthreadTryJoin return. Outside an ulthread the three return ULT_ERROR_STATE.
2026-10-20 14:35:34 +03:00
Yossi Yadgar ea3e23bd86 feat(libSceUlt): implement the reader-writer lock
Readers share the lock while no writer holds it and a writer waits until it is free. Destroying a held or waited-on lock and destroying the waiting-queue pool of a lock a thread waits on return ULT_ERROR_BUSY, and sceUltFinalize wakes waiters with ULT_ERROR_STATE, as for the mutex.
2026-10-20 14:35:34 +03:00
Yossi Yadgar e2c38222fe feat(libSceUlt): implement the semaphore, queue, pool and ulthread option initializers
Each clears its 128-byte option structure, as sceUltMutexOptParamInitialize and sceUltUlthreadRuntimeOptParamInitialize already do.
2026-10-20 14:35:20 +03:00
Yossi Yadgar 9d84fac304 feat(libSceUlt): implement sceUltMutexTryLock
It takes a free mutex or relocks one the caller holds, as sceUltMutexLock does, and returns ULT_ERROR_BUSY instead of waiting when another thread holds it.
2026-10-20 14:35:20 +03:00
JJenkx 63dbd310ba feat(ult): bind condition variables to the current mutex lifecycle 2026-10-20 00:23:58 -04:00
al3w0f205 dba05da0e5 feat(libSceUlt): export missing firmware functions from database 2026-10-19 21:34:45 -05:00
mrfelek ca9f4e47b1 feat(libSceUlt): implement sceUltMutexDestroy and sceUltWaitingQueueResourcePoolDestroy 2026-10-14 15:07:48 +02:00
Semir Kabir 0634b443ef feat(libSceUlt): accept option parameters in sceUltQueueCreate and sceUltQueueDataResourcePoolCreate 2026-10-12 22:48:53 +02:00
Semir Kabir 54b9b93240 feat(libSceUlt): add underscore mutex and queue create exports 2026-10-11 09:29:28 -07:00
xXPBSXxandClaude Sonnet 5.5 c4d29f6a99 fix(exports): export the calls PPSA01530, PPSA23827 and PPSA13356 import
Forwards _sceUltWaitingQueueResourcePoolCreate and _sceUltSemaphoreCreate to the existing calls, like the other underscore Ult exports. Declares sceNetShowIfconfig, sceNpWebApi2GetMemoryPoolStats, Json::Value::setNullAccessCallBack, kqueue, kevent and one pad call of unknown name without an implementation.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-11 11:07:03 +02:00
EdouardSenceandClaude Opus 5.5 04dda44d3d feat(libSceUlt): implement sceUltUlthreadTryJoin, sceUltUlthreadRuntimeDestroy and the underscore ulthread exports
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-09 23:31:01 +02:00
muhzain05 fd597084f9 fix(ult): reject finalize with outstanding ulthreads
sceUltFinalize cleared gUlthreads directly, dropping the last
shared_ptr to an UltUlthreadState while its worker thread still held
the raw pointer passed to scePthreadCreate. Finalize now returns
ULT_ERROR_BUSY when an ulthread is still registered, before any global
state is torn down, following the BUSY convention of the queue,
semaphore and queue data pool destroy paths. Joining the ulthread
remains the caller's responsibility, as sceUltUlthreadJoin already
keeps the state alive across scePthreadJoin and erases it afterwards.
2026-10-08 10:51:50 -06:00
Claude 121d9332b5 build(libs): strip the MinGW static runtime flags once for all libraries
Every library CMakeLists.txt ended with the same block removing -static,
-static-libgcc and -static-libstdc++ from CMAKE_EXE_LINKER_FLAGS on MinGW,
because core/libs/CMakeLists.txt only removed them after adding the library
directories. Remove them before the libc and library directories are added
so each directory inherits the stripped flags, and drop the 52 copies.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_017pTZqAyVSZy2FZmaqakPHZ
2026-10-07 10:10:38 +00:00
Nicolas Abosch 65c139336e feat(ult): implement blocking queues and shared data pools 2026-10-05 00:52:22 -03:00
boykopovar b765cefa42 fix(libs): fix args sysv abi for types (windows) 2026-09-10 19:54:03 +03:00
boykopovar abc72da741 feat(libs): define vabi macros + add to declarations 2026-09-10 08:07:03 +03:00
boykopovar 5ae2a810e9 feat(libult): add libsceult impl 2026-09-07 11:37:55 +03:00
boykopovar 6123893998 feat(libs): throw not impl ex in every stub 2026-09-06 15:05:04 +03:00
boykopovar 59bee8d187 feat(libs): add libs function signatures 2026-08-20 23:18:16 +03:00