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

Closed
Prophet069 wants to merge 1 commit from upstream-pr/2961 into main
Prophet069 commented 2026-10-10 18:56:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Prophet069 on 2026-10-10T18:56:18Z.


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.

Tested

Windows: affected libc built from this branch with a standalone CMake driver using the repository libc target; functional CTest guest_hardware_concurrency passed (0.03 s). Linux/macOS and full-project CI not run. This is not a claim of a recorded title crash on unmodified main.

Base: 3cb317fcfd877f93b0b65adbe7b737ba1ba5123f; candidate: 34224888aad3dc31d1b71abe125b10dbaf489355. python tools/check_conventions.py --base origin/main passed.

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 fail; no silent success stub added
  • No investigation files, game data, dumps, logs or images in the branch
  • No new third-party dependency
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes. Prepared and tested with Codex.

Tests were run on1476f769 and retained across the conflict-free rebase to3cb317fc. That upstream interval does not change the tested libc/decoder/IR sources. No game was started for this submission.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4813658938 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2961). Originally posted by [Prophet069](https://github.com/Prophet069) on 2026-10-10T18:56:18Z. --- ### 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. ### Tested Windows: affected libc built from this branch with a standalone CMake driver using the repository libc target; functional CTest `guest_hardware_concurrency` passed (0.03 s). Linux/macOS and full-project CI not run. This is not a claim of a recorded title crash on unmodified main. Base: `3cb317fcfd877f93b0b65adbe7b737ba1ba5123f`; candidate: `34224888aad3dc31d1b71abe125b10dbaf489355`. `python tools/check_conventions.py --base origin/main` passed. ### 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 fail; no silent success stub added - [x] No investigation files, game data, dumps, logs or images in the branch - [x] No new third-party dependency - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes. Prepared and tested with Codex. Tests were run on1476f769 and retained across the conflict-free rebase to3cb317fc. That upstream interval does not change the tested libc/decoder/IR sources. No game was started for this submission.
github-actions[bot] commented 2026-10-10 19:05:48 +00:00 (Migrated from github.com)

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


Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6101127427 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2961#issuecomment-6101127427). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-10T19:05:48Z. --- Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.
github-actions[bot] commented 2026-10-10 19:21:18 +00:00 (Migrated from github.com)

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


Progress report (3cb317f → 3422488)

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

✅ 1 implemented
Library Name
libc _ZNSt8__sce_v226_Thrd_hardware_concurrencyEv_nid_postfix
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6101263787 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2961#issuecomment-6101263787). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-10T19:21:18Z. --- <!-- progress-report --> ### Progress report (3cb317f → 3422488) ➖ **System libraries**: 84.48% (+0.0%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libc | `_ZNSt8__sce_v226_Thrd_hardware_concurrencyEv_nid_postfix` | </details>

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