fix(libkernel): report the thread policy in attribute queries #5451
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5451"
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 calbebop on 2026-10-13T20:06:49Z.
What
pthread_attr_get_npleaves the destination attribute's previous scheduling policy unchanged, andscePthreadAttrGetalways reports FIFO. Both now copy the thread's stored policy, so attribute queries agree with explicit or inherited creation and later successful scheduling changes.The regression queries both exports after RR creation and RR → FIFO → RR changes, preloading the destination with the opposite policy before each query. The policy snapshot follows FreeBSD 11.4's attribute query and scheduling update. The debt entry records that applying the same rule to the SCE query has not been measured on PS5 hardware.
Tested
Ubuntu 24.04, GCC 13.3, x86-64, entirely inside Docker Desktop.
dacd78525. A diagnostic run records incorrect policies in 10 of 12 queries.a0f5916a2; all production libraries and the relinker build successfully.ctest -R '^(guest_pthread_.*|guest_available_cpumask|guest_sched_priority|patched_libraries)$'.python3 tools/check_conventions.py --base origin/mainandgit diff --checkpass.No Windows, PS5 hardware, or title run was performed. This corrects reported guest metadata; it does not change host scheduling. The entire project test suite was not run.
Checklist
main; no other open PR implements this policy-query correction (checked the open PR list and adjacent #4514, #4563, #4981, and #5230 diffs).mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-13T20:32:10Z.
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.
main)docs/dev/debt/libkernel.mdL13docs/dev/debt/libkernel.mdL13docs/dev/debt/libkernel.mdL13Pull request closed