Repository navigation
feat(libc): export guest hardware concurrency hint - #1814
Closed
Prophet069 wants to merge 1 commit into
Closed
Prophet069 wants to merge 1 commit into
Prophet069 wants to merge 1 commit into
Conversation
7 tasks done
|
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.
|
This was referenced Oct 9, 2026
Collaborator
|
Same as #1806, for |
ycbuzi
pushed a commit
to ycbuzi/AnyPS5
that referenced
this pull request
Oct 10, 2026
…cy hint Harvested from upstream (closed unmerged); library completion 2922/3294 -> 2923/3295. Additive conflicts resolved by keeping both sides: core/libs/prx/libc/CMakeLists.txt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011krDVCnnMQPaEFEqCDnKmA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Implements
std::__sce_v2::_Thrd_hardware_concurrency()inlibcwith NIDdt3C+gjXHKk.The export has the signature
unsigned int () noexcept, usesextern "C",APS5_VABIand the existing_nid_postfixexport mechanism, and returnsstd::thread::hardware_concurrency()unchanged. This preserves the host's hardware-thread hint, including zero when unavailable, without inventing a fallback count. The wrapper adds no shared mutable state or caching.The return type and no-argument signature agree with Microsoft STL's declaration. Zero follows the standard hardware-concurrency contract. The NID agrees with the existing PS5 symbol database.
Based on
mainat4b6ab6bb7371869f85837ff824f409b49f1e8081. A search of all 390 open PRs found no matching implementation. This change is independent of #1806 and contains no mathematics exports or tests.Tested
Windows x86-64, MinGW GCC 15.2.0, CMake/Ninja Release with
BUILD_TESTING=ON:libc,guest_hardware_concurrency_tests,guest_thread_callback_abi_tests,guest_demangle_testsandnid_patcher, with at most four build jobs.guest_hardware_concurrency,guest_thread_callback_abiandguest_demanglethrough CTest, each three times: all passed, with every run below 0.13 seconds.noexceptdeclaration. No host returning zero was available; that path was reviewed, not separately simulated.libc.prxwithnid_patcherand verified the actual NID export usingimport_audit.read_exportsandnid_names.compute_nid.check_test_registration.pypassed: 427 test targets, only the three previously documented exclusions, no new unregistered tests.git diff --checkandtools/check_conventions.py --base origin/mainpassed; the conventions check also validated this PR title and description.Linux compatibility was reviewed at source level: the implementation and test use standard C++ facilities, and
APS5_VABIselects the native ABI on Linux. Linux was not built or executed locally because no usable Linux environment is installed; Linux CI remains required. No full-project build, game or homebrew execution was performed.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt (no new stubs).mdfiles or images added to the repository (attach them to this PR)