Repository navigation
fix(libkernel): accept SCHED_OTHER in sched_get_priority_max/min - #1908
Merged
oneandonlydean merged 1 commit intoOct 10, 2026
Merged
Conversation
This was referenced Oct 8, 2026
MarcZX10
reviewed
Oct 9, 2026
MarcZX10
left a comment
Contributor
There was a problem hiding this comment.
I reviewed the full diff. The validation change accepts only SCHED_OTHER in addition to the existing policies, keeps other values rejected, and the focused test covers both limits and invalid policies. The console range uncertainty is recorded in TechnicalDebt. The current-head Build, Windows and Linux suites, and Conventions checks are green. I found no blocking issue.
This was referenced Oct 9, 2026
9 tasks done
SDL queries the SCHED_OTHER range before it sets a thread priority. It gets the same 256 to 767 range as SCHED_FIFO and SCHED_RR, which pthread_setschedparam applies regardless of policy. The console's answer is unverified and recorded in TechnicalDebt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TheAggie
force-pushed
the
fix/libkernel-sched-other-priority
branch
from
October 10, 2026 05:57
71cc955 to
570aac4
Compare
9 tasks done
9 tasks done
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
sched_get_priority_maxandsched_get_priority_minaccepted onlySCHED_FIFO(1) andSCHED_RR(3) and threw forSCHED_OTHER(2). SDL queries theSCHED_OTHERrange before it sets a thread priority, so SDL titles stopped there. Quake II (PPSA99007, the homebrew port) hits it at startup.SCHED_OTHERnow reports the same 256 to 767 range as the other two policies.pthread_setschedparamapplies a priority regardless of policy, so a priority taken from this range works. Policies outside 1-3 still throw.What the console reports for
SCHED_OTHERis unverified. FreeBSD accepts it with its own range, and shadPS4 rejects it withEINVAL. TechnicalDebt records this.core/libs/prx/libkernel/System/src/Process.cpp: accept policies 1-3.guest_sched_priority: policies 1, 2 and 3 report max 256 and min 767, and 0 and 4 throw.docs/dev/TechnicalDebt.md: the entry above.Tested
Windows 11 Pro (26200), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release.
mainwith this PR and four other small PRs of mine merged together (SCHED_OTHER priority range, MAP_ALIGNED_SUPER, the compatible pad vibration mode, empty-PT_TLS stack-guard reads, pthread_attr scope/getters). It was run from the generatedCTestTestfile.cmakecommands because antivirus blocksctest.exeon this machine.tools/check_conventions.py --base origin/mainpasses on this branch alone.Not tested on Linux or macOS.
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)🤖 Generated with Claude Code