feat(libSceAmpr): implement _Cnd_signal and _Cnd_init_with_name #3499
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3499"
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 blawesom on 2026-10-11T11:45:50Z.
What
Carries @screamm's fix from #3342 (the author is under the open-PR limit). The commit is theirs, unchanged (
dce174749), rebased onto currentmain.Deathloop (PPSA01670), Minecraft Legends and GTA III Definitive Edition import these exports; both were
NotImplemented_nid_no_patchstubs after #3079 gave libc the Dinkumware_Cnd_*family:_Cnd_signal(pthread_cond**)uses the pointer-to-slot ABI the #3079 review established and a new libc helperSignalCondition_nid_no_patch(inThreads.cpp) that wakes one waiter of the condition objects libc's_Cnd_initcreates and returns_Thrd_success, like the merged_Cnd_broadcast; bad handles throw the sameinvalid_argumentas libc._Cnd_init_with_name(pthread_cond**, const char*)calls libc's_Cnd_initand ignores the name, following fpPS4's reverse-engineered PS4_Mtx_init_with_namewhere the name only names the pthread object._Thrd_idkeeps throwing: no public source settles the PS5 return form. All recorded in TechnicalDebt.Tested
guest_ampr_threadsandguest_libc_threadspass, full suite 507/507, withmain'sExport.cppthe extended Ampr test fails.BUILD_TESTING=ON—guest_ampr_threadsandguest_libc_threadspass (including the 50 ms "wakes exactly one" window); full suite 829/829 including the Vulkan tests on AMD RX 9070 XT (RADV GFX1201);tools/check_conventions.py --base origin/mainandgit diff --checkpass.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 repositoryImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T12:06:00Z.
Progress report (
cafc074→dce1747)📈 System libraries: 85.81% (+0.06%, +2 implemented functions)
✅ 2 implemented
_Cnd_init_with_name_nid_postfix_Cnd_signal_nid_postfixImported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-11T13:45:52Z.
Highlighting what merging this unblocks, for whoever triages the queue:
The change itself: the last two missing Dinkumware condition-variable exports of libSceAmpr —
_Cnd_signaland_Cnd_init_with_name— which Deathloop (PPSA01670), Minecraft Legends and GTA III Definitive Edition import (#3342). The ABI follows the #3079 review's pointer-to-slot model,_Cnd_broadcastis the already-merged sibling, and the commit is @screamm's, unchanged.Verification state: dual-platform — the author's Windows run in #3342, and an independent Linux full-suite pass (829/829, including every Vulkan test on real RDNA4/RADV, plus
guest_ampr_threads/guest_libc_threadsand a negative control onmain's stubs). All checks here are green, including the macOS register-context and write-watch matrix.The compounding part: this is currently my only open PR under the intake limit (no merged PRs yet). If it merges, the 20-slot allowance opens — and I maintain 30 dual-platform-verified fix branches from intake-gated authors that are carry-ready against current
main(e.g. #3410's Ajm M4AAC decoder for Ghost of Yotei, verified with a negative control). Two of those have already reachedmainthrough other carriers (#3181 → #3433, #3360 → #3448). Merging this one PR converts a verifier into a carrier, which is worth more than the two exports themselves.If
mainmoves before this merges and it needs a rebase, I maintain the branch and will push one promptly.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T15:05:56Z.
Thanks for flagging the overlap. I carried David's #3499 implementation onto current
mainas commitf6266acb8with David retained as author, then added a five-second bound to the waiter-state checks and a 20-second CTest timeout. The focused Linux/GCC 12.2 Release test passes 3/3 on that consolidated branch.I think my #3657 branch is the better review target for the test coverage: it retains David's two-waiter
notify_onecheck, while ensuring a broken waiter setup fails promptly instead of hanging. Your issue report's Windows run and independent full-suite result are stronger than my local evidence, and I've attributed them in the PR body rather than claiming them as my own.The collaborator closed #3657 as a duplicate before I pushed this consolidation. GitHub now rejects reopening it because its branch was force-pushed after closure. I have not opened another live PR while yours remains open, to avoid leaving two PRs for the same functions. Would you be willing to close #3499 so I can open a replacement from the consolidated branch? If you prefer to keep #3499 as the review target, the test-timeout follow-up is at
ca9cc44ceand can be cherry-picked there.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T15:27:42Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libSceAmpr/Export.cppL236docs/dev/TechnicalDebt.mdL354core/libs/tests/GuestAmprThreads.cppL4, L199-200docs/dev/TechnicalDebt.mdL354core/libs/tests/GuestAmprThreads.cppL4, L199-200docs/dev/TechnicalDebt.mdL354Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T21:29:08Z.
Checked on Linux (GCC, merged onto current main):
guest_ampr_threadspasses, and fails when the non-test changes are reverted. Dinkumware ABI matches the merged_Cnd_broadcast, TechnicalDebt entry records the unverified console behaviour; merging.