feat(libc): export std:🧵:hardware_concurrency (PPSA34015) #6086
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6086"
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 notaxeltv on 2026-10-14T21:33:50Z.
What
tools/import_audit.pyon PPSA34015 lists absentlibc.prximportCHrhwd8QSBs(_ZNSt6thread20hardware_concurrencyEv). Forwards tostd::thread::hardware_concurrency(). Distinct from closed_Thrd_hardware_concurrency/__sce_v2exports (#5415).Tested
Windows 10, WinLibs GCC 15.2.0,
guest_std_thread_hardware_concurrencypasses.tools/check_conventions.py --base upstream/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Made with Cursor
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-16T22:43:46Z.
Review: CHANGES_REQUESTED
Built and ran
guest_std_thread_hardware_concurrencylocally: passes. Two things before merging:core/libs/tests/GuestStdThreadHardwareConcurrency.cpp:23: the comparison againstsysconf(_SC_NPROCESSORS_ONLN)/GetSystemInfois not guaranteed to matchstd::thread::hardware_concurrency()(CPU affinity, cgroup limits, processor groups), so the test can fail spuriously. Keep only the comparison withstd::thread::hardware_concurrency().core/libs/prx/libc/src/Threads.cpp:273: the export returns the host CPU count; the PS5 value is not sourced from anywhere (no reference implements it). Add a line to the technical debt file under the right section saying the host count is returned instead of the console's, and what PPSA34015 expects if you know it.