feat(libSceUlt): implement sceUltUlthreadTryJoin, sceUltUlthreadRuntimeDestroy and the underscore ulthread exports #2153
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2153"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by EdouardSence on 2026-10-09T10:07:23Z.
What
Rise of the Ronin (PPSA04540) imports these five libSceUlt functions, and none of them is exported:
_sceUltUlthreadRuntimeOptParamInitialize_sceUltUlthreadRuntimeCreate_sceUltUlthreadCreatesceUltUlthreadTryJoinsceUltUlthreadRuntimeDestroyOn
mainthe relinked title doesn't start, because the loader reports them as undefined symbols. The title imports no libSceUlt function without the underscore exceptsceUltInitialize,sceUltFinalize,sceUltUlthreadJoinandsceUltUlthreadRuntimeGetWorkAreaSize. So the underscore names are the exported entry points the SDK calls.sceUltUlthreadRuntimeOptParamInitialize,sceUltUlthreadRuntimeCreateandsceUltUlthreadCreate. Those already take the trailing build version argument.sceUltUlthreadTryJoin: returnsULT_ERROR_BUSYwhile the ulthread's entry has not returned. Otherwise it joins likesceUltUlthreadJoin.sceUltUlthreadRuntimeDestroy: returnsULT_ERROR_BUSYwhile an ulthread created on the runtime is not joined. Otherwise it forgets the runtime, so a latersceUltUlthreadCreateon it returnsULT_ERROR_STATE.The shared signatures and both busy rules are inferred. They are recorded in TechnicalDebt.
Tested
Linux (CachyOS, GCC), RX 9070 XT.
guest_ult_thread_tryjoinandguest_ult_thread_destroycover busy and joinedTryJoin, busy and idleRuntimeDestroy, a destroyed runtime, and the null and unknown cases, all through the underscore exports. The existingguest_ult_*tests still pass (10/10).tools/check_conventions.py: passes.computed/data-dependent s_swappc_b64 call target at program counter 0x00000074 is not statically resolvable(#1817)._sceUltUlthreadRuntimeOptParamInitialize not implemented.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T10:07:58Z.
Progress report (
54f28f2→04dda44)📈 System libraries: 85.33% (+0.03%, +5 implemented functions)
✅ 5 implemented
_sceUltUlthreadCreate_sceUltUlthreadRuntimeCreate_sceUltUlthreadRuntimeOptParamInitializesceUltUlthreadRuntimeDestroysceUltUlthreadTryJoinImported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T15:46:51Z.
Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head
fd7c096b, merged ontomaind70b8998in one build with 38 other PRs that had no Windows run.guest_ult_thread_tryjoin,guest_ult_thread_destroy,guest_ult_thread_outstanding,guest_ult_thread_validation. None of them reported skipping a case.No title was run.
🤖 Addressed by Claude Code
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-09T21:59:47Z.
Checked: the 3 underscore forwarders,
TryJoinandRuntimeDestroyagainst the diff;guest_ult_thread_*pass locally (4/4) and the new tests don't link without the change. The BUSY returns are recorded as inferred in TechnicalDebt (prosper, the only reference, returns EAGAIN with MED confidence and no second source). Windows ctest confirmed by @popcoder565. The only red job (hardware_oracleon Windows) is unrelated; merging once CI is green.