feat(libSceAmpr): implement condition signal exports #3657

Closed
MarcZX10 wants to merge 1 commit from upstream-pr/3657 into main
MarcZX10 commented 2026-10-11 14:56:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T14:56:02Z.


What

_Cnd_signal and _Cnd_init_with_name now operate on the libc-owned condition objects used by _Cnd_wait, _Cnd_broadcast and _Cnd_init. _Cnd_signal wakes one waiter; _Cnd_init_with_name initializes the same object as _Cnd_init and ignores the optional name. TechnicalDebt records that the inferred ABI and behavior still need console confirmation.

Commit f6266acb8 carries David's implementation from blawesom's #3499, retaining David as commit author and the cherry-pick source. The follow-up test commits preserve the two-waiter notify_one regression coverage, bound each waiter-state wait to five seconds, and set the CTest timeout to 20 seconds so a broken signal path cannot leave this test hanging indefinitely.

Tested

  • Linux x86_64, GCC 12.2, Release: built guest_ampr_threads_tests; guest_ampr_threads passed 3/3 consecutive runs on this head.
  • python3 tools/check_conventions.py --base upstream/main and git diff --check upstream/main...HEAD passed.
  • David's carried implementation had native Windows verification reported on issue #3342. The original #3499 branch also had an independent Linux full-suite run reported as 520/520 on that issue. Those runs preceded the bounded-wait test-only changes in this PR; Windows and the named titles were not run here.

Checklist

  • Based on current main; the overlapping implementation from #3499 is carried and credited in this PR
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation files or images added to the repository
  • New third-party code is a submodule built from source (not applicable)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes

Fixes #3342

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4819949765 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3657). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-11T14:56:02Z. --- ### What `_Cnd_signal` and `_Cnd_init_with_name` now operate on the libc-owned condition objects used by `_Cnd_wait`, `_Cnd_broadcast` and `_Cnd_init`. `_Cnd_signal` wakes one waiter; `_Cnd_init_with_name` initializes the same object as `_Cnd_init` and ignores the optional name. TechnicalDebt records that the inferred ABI and behavior still need console confirmation. Commit `f6266acb8` carries David's implementation from [blawesom's #3499](https://github.com/boykopovar/AnyPS5/pull/3499), retaining David as commit author and the cherry-pick source. The follow-up test commits preserve the two-waiter `notify_one` regression coverage, bound each waiter-state wait to five seconds, and set the CTest timeout to 20 seconds so a broken signal path cannot leave this test hanging indefinitely. ### Tested - Linux x86_64, GCC 12.2, Release: built `guest_ampr_threads_tests`; `guest_ampr_threads` passed 3/3 consecutive runs on this head. - `python3 tools/check_conventions.py --base upstream/main` and `git diff --check upstream/main...HEAD` passed. - David's carried implementation had native Windows verification reported on [issue #3342](https://github.com/boykopovar/AnyPS5/issues/3342). The original #3499 branch also had an independent Linux full-suite run reported as 520/520 on that issue. Those runs preceded the bounded-wait test-only changes in this PR; Windows and the named titles were not run here. ### Checklist - [x] Based on current `main`; the overlapping implementation from #3499 is carried and credited in this PR - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation files or images added to the repository - [x] New third-party code is a submodule built from source (not applicable) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes Fixes #3342
github-actions[bot] commented 2026-10-11 14:56:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T14:56:25Z.


Progress report (a11c8f7 → 625196b)

📈 System libraries: 85.87% (+0.06%, +2 implemented functions)

✅ 2 implemented
Library Name
libSceAmpr _Cnd_init_with_name_nid_postfix
libSceAmpr _Cnd_signal_nid_postfix
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6110304932 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3657#issuecomment-6110304932). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T14:56:25Z. --- <!-- progress-report --> ### Progress report (a11c8f7 → 625196b) 📈 **System libraries**: 85.87% (+0.06%, +2 implemented functions) <details> <summary>✅ 2 implemented</summary> | Library | Name | | - | - | | libSceAmpr | `_Cnd_init_with_name_nid_postfix` | | libSceAmpr | `_Cnd_signal_nid_postfix` | </details>
blawesom commented 2026-10-11 14:59:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-11T14:59:43Z.


Note for the maintainers: #3499 is an earlier open PR implementing these same two exports — it carries @screamm's commit from #3342 unchanged, is CLEAN with all checks green, and has dual-platform verification (the author's Windows run in #3342 plus an independent Linux full-suite pass, 829/829 including the Vulkan suites).

This PR looks like a clean independent implementation of the same issue, so whichever you prefer is fine — flagging only so the duplication is visible and one review isn't wasted.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6110334728 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3657#issuecomment-6110334728). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-11T14:59:43Z. --- Note for the maintainers: #3499 is an earlier open PR implementing these same two exports — it carries @screamm's commit from #3342 unchanged, is CLEAN with all checks green, and has dual-platform verification (the author's Windows run in #3342 plus an independent Linux full-suite pass, 829/829 including the Vulkan suites). This PR looks like a clean independent implementation of the same issue, so whichever you prefer is fine — flagging only so the duplication is visible and one review isn't wasted.
adriadam10 commented 2026-10-11 15:03:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T15:03:35Z.


Closing as a duplicate: #3499 (opened earlier, mergeable, CI green) already implements _Cnd_signal and _Cnd_init_with_name for #3342, touching the same files, and CONTRIBUTING asks that no two open PRs implement the same functions.

Thanks for the work and the test. If #3499 turns out not to be the one that lands, or you find a gap in it, feel free to reopen this or comment there.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6110369877 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3657#issuecomment-6110369877). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T15:03:35Z. --- Closing as a duplicate: #3499 (opened earlier, mergeable, CI green) already implements `_Cnd_signal` and `_Cnd_init_with_name` for #3342, touching the same files, and CONTRIBUTING asks that no two open PRs implement the same functions. Thanks for the work and the test. If #3499 turns out not to be the one that lands, or you find a gap in it, feel free to reopen this or comment there.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!3657
No description provided.