feat(libkernel): implement cpuset_getaffinity for the calling thread #2516
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2516"
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 babyhuey on 2026-10-10T00:22:04Z.
What
Implements
cpuset_getaffinity(Pdgml4rbxYk) in libkernel for the calling thread (CPU_LEVEL_WHICH,CPU_WHICH_TID, id-1): it copies the thread's guest affinity fromscePthreadGetaffinityinto the caller's set and zeroes the rest of the buffer. The set size must be at least the 8-byteKernelCpumaskand at most 32 bytes (CPU_MAXSIZE256 bits), otherwiseERANGE; a null set givesEFAULT. Other levels,whichvalues and ids throw (NotImplemented_nid_no_patch).Why
It is a title's next stop on current
main: PPSA99082 OpenNOW PS5 0.0.7 stops on it.main2edaf7f4(Linux)app.elf: symbol lookup error: app.elf: undefined symbol: Pdgml4rbxYkundefined symbol: V02oFv+-JzA(__isinf)OpenNOW's only call site (eboot
0x1dca8) iscpuset_getaffinity(3, 1, -1, 8, set), so titles pass an 8-byte set and the 8-byte minimum accepts it. On failure it falls back to a0x3fmask.Tested
Linux (Ubuntu 24.04, GCC 13, Release):
guest_available_cpumaskpasses with--repeat until-fail:3. It checks, from a guest thread, that an 8-byte set gets the thread's mask and nothing past it is written, a 32-byte set gets the mask with the tail zeroed, and that 4 and 33 bytes giveERANGEand a null set givesEFAULT.check_conventions.pypasses. Windows:Thread.cppcompiles with MinGW-w64 (-Wall -Wextra -fsyntax-only).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T00:22:14Z.
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.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T00:22:26Z.
Progress report (
1f0c9fe→d4ffa85)📉 System libraries: 85.66% (-0.03%, +1 declared functions)
🆕 1 declared as stubs
cpuset_getaffinity_nid_postfixPull request closed