feat(libkernel): return ESRCH and EINVAL for unsupported cpuset affinity targets #4168
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4168"
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 jagrat04 on 2026-10-12T00:25:57Z.
What
Handle invalid targets and unsupported scopes in
cpuset_getaffinityandcpuset_setaffinityinlibkernel:levelis notCPU_LEVEL_WHICH(3) orwhichis notCPU_WHICH_TID(1) /CPU_WHICH_PID(2), returnEINVAL(22) instead of throwingNotImplemented_nid_no_patch.whichisCPU_WHICH_TID, allow the caller to pass its own thread ID (self->tid) in addition to-1. Ifiddoes not match the calling thread, returnESRCH(3) instead of throwing.whichisCPU_WHICH_PID, ifidis not-1and notgetpid(), returnESRCH(3) instead of throwing.core/libs/tests/GuestAvailableCpumask.cpp.docs/dev/TechnicalDebt.md.Tested
python tools/check_conventions.py --base origin/mainpassed with 0 violations.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-12T00:29:41Z.
Progress report (
bca7a29→a225789)📈 System libraries: 86.53% (+0.06%, +2 implemented functions)
✅ 2 implemented
cpuset_getaffinity_nid_postfixcpuset_setaffinity_nid_postfixImported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-12T08:28:34Z.
Closing: no title is shown to reach these paths, and
cpuset_getaffinity/cpuset_setaffinitynow answerESRCHfor the id of any other thread, live ones included, where main throws because other threads aren't handled. Reopen with the title ID and the log line where it stops on main.Pull request closed