feat(libc): export the guest hardware concurrency hint #5415

Closed
Prophet069 wants to merge 1 commit from upstream-pr/5415 into main
Prophet069 commented 2026-10-13 19:21:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Prophet069 on 2026-10-13T19:21:17Z.


What

The PS5 C++ namespace export for _Thrd_hardware_concurrency is absent. Forward its unsigned hint through the existing guest ABI to std::thread::hardware_concurrency, including the permitted unknown/zero result. The functional regression compares the host processor hint and calls it from multiple threads.

Replaces the obsolete base of closed #2961, which was automatically closed for intake pause. Targeted current GitHub search found no other open PR implementing this exact export.

Tested

Windows 10 Pro 22H2 x64 (build 19045), MinGW GCC 15.2.0: built the complete candidate libc.prx from this branch and ran the functional guest_hardware_concurrency regression successfully. Tests use synthetic guest-ABI inputs; no game startup, Linux/macOS build or maintainer CI run is claimed.

Based on main dacd78525e537a779682032c0ace7f7af120af05; candidate e188818cabdbc1443615b1c326639cb130eb00a4. No dumps, runtime packages, investigation reports or images are included. No speed improvement is claimed.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw; no silent success stub added
  • No notes, investigation .md files or images added to the repository
  • New third-party code: none
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none (no clean-main Game bring-up claim)
  • GPUs tested: n/a (libc change)
  • AI-assisted: yes; prepared with Codex; the submitting author is responsible for every line
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4848299770 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5415). Originally posted by [Prophet069](https://github.com/Prophet069) on 2026-10-13T19:21:17Z. --- ### What The PS5 C++ namespace export for `_Thrd_hardware_concurrency` is absent. Forward its unsigned hint through the existing guest ABI to `std::thread::hardware_concurrency`, including the permitted unknown/zero result. The functional regression compares the host processor hint and calls it from multiple threads. Replaces the obsolete base of closed #2961, which was automatically closed for intake pause. Targeted current GitHub search found no other open PR implementing this exact export. ### Tested Windows 10 Pro 22H2 x64 (build 19045), MinGW GCC 15.2.0: built the complete candidate libc.prx from this branch and ran the functional `guest_hardware_concurrency` regression successfully. Tests use synthetic guest-ABI inputs; no game startup, Linux/macOS build or maintainer CI run is claimed. Based on main `dacd78525e537a779682032c0ace7f7af120af05`; candidate `e188818cabdbc1443615b1c326639cb130eb00a4`. No dumps, runtime packages, investigation reports or images are included. No speed improvement is claimed. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw; no silent success stub added - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code: none - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none (no clean-main Game bring-up claim) - [x] GPUs tested: n/a (libc change) - [x] AI-assisted: yes; prepared with Codex; the submitting author is responsible for every line
github-actions[bot] commented 2026-10-13 19:22:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-13T19:22:14Z.


Progress report (dacd785 → e188818)

➖ System libraries: 88.15% (+0.0%, +1 implemented functions)

✅ 1 implemented
Library Name
libc _ZNSt8__sce_v226_Thrd_hardware_concurrencyEv_nid_postfix
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6153361951 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5415#issuecomment-6153361951). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-13T19:22:14Z. --- <!-- progress-report --> ### Progress report (dacd785 → e188818) ➖ **System libraries**: 88.15% (+0.0%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libc | `_ZNSt8__sce_v226_Thrd_hardware_concurrencyEv_nid_postfix` | </details>
CnRJay commented 2026-10-14 01:28:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-10-14T01:28:22Z.

Review: COMMENTED


Withdrawn. This review applied a title-ID/log requirement that is not in CONTRIBUTING (Unblocks: none is allowed), and it contained no code review.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5512012182 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5415#pullrequestreview-5512012182). Originally posted by [CnRJay](https://github.com/CnRJay) on 2026-10-14T01:28:22Z. **Review:** COMMENTED --- Withdrawn. This review applied a title-ID/log requirement that is not in CONTRIBUTING (`Unblocks: none` is allowed), and it contained no code review.
oneandonlydean commented 2026-10-14 02:27:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T02:27:10Z.


Closing: no title is known to reach this. With the queue at 700+ open PRs, please hold off on new PRs that don't name a title needing the change until it's down. If a title stops on this on current main, reopen with the title ID and the log line.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6159521210 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5415#issuecomment-6159521210). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-14T02:27:10Z. --- Closing: no title is known to reach this. With the queue at 700+ open PRs, please hold off on new PRs that don't name a title needing the change until it's down. If a title stops on this on current main, reopen with the title ID and the log line.
Prophet069 commented 2026-10-15 05:08:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Prophet069 on 2026-10-15T05:08:07Z.


PPSA02015 reaches it

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6184890785 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5415#issuecomment-6184890785). Originally posted by [Prophet069](https://github.com/Prophet069) on 2026-10-15T05:08:07Z. --- PPSA02015 reaches it

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!5415
No description provided.