feat(libkernel_sys): implement cpuset_getid for WhichCpuset #13127
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13127"
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 iAbdulrrahman on 2026-10-30T03:25:03Z.
What
Implement cpuset_getid for CPU_WHICH_CPUSET (which == WhichCpuset) in libkernel_sys per FreeBSD 11.4 kern_cpuset.c specifications, validating valid dynamic/root/default cpusets, returning EINVAL for id == -1, ESRCH for unknown set IDs, and copying out the requested set ID based on level (LevelRoot returns RootSetId, LevelCpuset and LevelWhich return the cpuset ID).
Tested
Windows 11,
ctest --test-dir build -R "^guest_kernel_sys_cpuset$" -Vpassed (100% tests passed).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)Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-11-01T19:50:16Z.
Review: COMMENTED
On the code: the new
WhichCpusetbranch still falls back toNotImplemented_nid_no_patchfor otherwhichvalues, which is right, but forwhich == WhichCpusetwith anidother than -1 please say which source the returned id comes from (disassembly of the libkernel wrapper, or the FreeBSD kernel behaviour) since the body does not say it was measured.