Commit Graph
17 Commits
Author SHA1 Message Date
Dean Galvin da677fdb96 Merge commit 'a644edf30c501a612d06f17d05ef1b7051350cef' into HEAD
# Conflicts:
#	core/libs/prx/libSceUlt/CMakeLists.txt
#	core/libs/prx/libSceUlt/src/ReaderWriterLock.cpp
2026-11-01 23:14:03 +13:00
milescovielloandClaude Opus 5.5 3e7492d600 test(libSceUlt): cover the mutex and ulthread runtime opt param initializers
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 20:47:29 +00:00
Dean Galvin 4a86bb0720 test(libSceUlt): pass the canonical UltOptParam pointer in the underscored rwlock test
The underscored exports take UltOptParam*; the test passed a raw byte
array, which only compiled against local untyped declarations.
2026-10-27 08:22:08 +13:00
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
Dean Galvin 07e89620f3 Merge branch 'main' into feat/ult-underscore-entry-points 2026-10-26 23:15:04 +13:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
StoneDC 35d36eabbc feat(libSceUlt): implement sceUltConditionVariableCreate and condition variable option initializers 2026-10-22 21:57:38 +08:00
boykopovar 9301f2ffeb test: align merged cases with recovered library behavior 2026-10-21 21:56:07 +03:00
NikoandClaude Opus 5.5 3142759029 feat(libSceUlt): export the underscore entry points of the option initializers and reader-writer lock creation
The console's libSceUlt exports these calls only under their
underscore names: _sceUltSemaphoreOptParamInitialize,
_sceUltQueueOptParamInitialize,
_sceUltQueueDataResourcePoolOptParamInitialize,
_sceUltWaitingQueueResourcePoolOptParamInitialize,
_sceUltUlthreadOptParamInitialize,
_sceUltReaderWriterLockOptParamInitialize and
_sceUltReaderWriterLockCreate are in the PS5 3.20 export list
(DNNDHH/PS5-3.20_Libs libSceUlt.c) and in the PS4 SDK stub list
(aerosoul94/dynlib dynlib.xml), and their names without the underscore
are in neither. Each now forwards to the export without the underscore,
passing the trailing build version, as _sceUltMutexOptParamInitialize
and _sceUltMutexCreate already do. The argument lists match the PS Vita
libult in RPCS3; that they hold on PS5 stays recorded as unmeasured in
the debt entry for the underscore forwarders.

The opt-params test also runs the six underscore initializers: a null
pointer returns ULT_ERROR_NULL, the 128-byte structure is cleared and
the bytes after it are left alone. The new rwlock-underscored test
checks that _sceUltReaderWriterLockCreate returns ULT_ERROR_NULL for a
null lock, ULT_ERROR_INVALID for an unknown pool without writing the
lock and ULT_ERROR_STATE for a second create, that it clears the
256-byte lock, and that the lock it creates on a waiting-queue pool
works with the read, write and destroy calls.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 16:56:57 +02:00
dantdmdarealguy 85c6fd88cb test(libSceUlt): give the ulthread runtime of the sync test its 4096 bytes
sceUltUlthreadRuntimeCreate clears 4096 bytes of the runtime object, and guest_ult_thread_tests already passes a 4096-byte runtime. The ulthreads case of guest_ult_sync_tests passed a 256-byte object, so the runtime creation wrote 3840 bytes past it on the stack. In a Windows Debug build the write runs off the top of the main thread stack and the test crashes with an access violation.
2026-10-20 19:08:14 -05: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