Repository navigation
fix(libkernel): report current thread scheduling policy in attributes - #8583
Merged
oneandonlydean merged 3 commits intoOct 20, 2026
Merged
Conversation
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
scePthreadAttrGetalways writes FIFO, even whenscePthreadGetschedparamreports RR for the same live thread.pthread_attr_get_npleaves the destination's previous policy untouched. Both attribute queries now read the thread's existing atomic scheduling-policy metadata.The scheduling regression checks both APIs with destinations preseeded to FIFO and RR, queries from the thread itself and from another thread, explicit and inherited creation policies, subsequent policy changes, rejected setters, and the existing SCE ESRCH result after join. The guest constants have a
GUEST_prefix because<future>brings in host scheduling macros.The policy-copy behavior follows FreeBSD 11.4 libthr's attribute query, whose copy range includes the policy; setschedparam updates that attribute. The console result of these attribute queries has not been measured, and that limit is recorded in the library's technical debt. Host scheduling is still unaffected. This addresses CORE 01 in #8005; no title compatibility claim is made.
Tested
Windows 11 Pro 10.0.26300; AMD Ryzen 9 7900X, 32 GB RAM, NVIDIA GeForce RTX 4070 Ti SUPER. WinLibs GCC 15.2.0 UCRT r7; Release with
BUILD_TESTING=ON.Base:
1b08a33b121e23a4f9e84999c233e094b5055893. Fix:ad1650686c0686bd6971eda5a7e40c74cc319279.guest_pthread_schedparamregressionThe probe uses a live guest thread, FIFO/RR settings, both attribute-query APIs and both destination policies. The committed regression also covers creation, inheritance, changes to another gated thread, and SCE ended-thread behavior. The unchanged
guest_pthread_attrandguest_pthread_attr_errorstests pass before and after.The overlap checker reports no confirmed conflicts. I manually reviewed its incomplete shared-file comparisons: #6893 changes guard-size fields, #6044 moves the unchanged scheduling test, and the debt changes concern other entries. #8041's guard-size change also leaves the policy untouched. None supplies this fix or is a prerequisite.
No console modules or game payloads are needed by the regression. No game run was performed.
Full all-target Windows Release build passed. The final seven runtime tests passed, including loading 354 patched libraries with zero failures. The full build used a temporary alignment adjustment confined to an unrelated existing test; it was restored afterward and is absent from the submitted diff.
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)