feat(libkernel): implement getpriority for the guest process #4374
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4374"
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 MarcZX10 on 2026-10-12T08:12:28Z.
What
Carries the
getpriorityimplementation from #3632, preserving the original commit author. For the single guest process, it follows FreeBSD 11.4:PRIO_PROCESSandPRIO_PGRPfor id 0 or the current pid, andPRIO_USERfor id 0 or the guest uid, return nice 0. UnknownwhichreturnsEINVAL; other ids returnESRCH. Successful calls leave guesterrnounchanged. The console nice value remains unmeasured and is documented indocs/dev/debt/libkernel.md.PPSA99420 reaches this import after
chflagsis resolved by #4379 (issue #1578). This PR covers onlygetpriority; the other exports from #3632 remain separate work.Tested
guest_sched_priority_tests; CTest passed 1/1, and conventions and diff checks passed.Checklist
main; no other open PR implements the same functiongetpriorityImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T08:23:31Z.
Progress report (
8d98e88→1ba0a81)📈 System libraries: 88.17% (+0.01%, +1 implemented functions)
✅ 1 implemented
getpriority_nid_postfixImported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T11:51:20Z.
Windows test: head
46614e273merged onto currentmain3d8ffeb27(clean merge, no conflicts). Windows 10, MinGW GCC (WinLibs), Ninja Release,-j4: full build 0 errors; ctest with the filterguest_sched_priority: guest_sched_priority passed (1 test(s), 0 failed);python tools/check_conventions.py --base upstream/mainpassed. I did not run the new tests againstmainwithout the change.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-12T14:42:08Z.
Rebase handoff — rebased onto current
main, authorship unchanged.One conflict in
Process.cpp: both sides add constants at the same spot — kept main's rlimit constants and this PR's priority/nice constants together.TechnicalDebt.mdunioned.Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
BUILD_TESTING=ON, AMD RX 9070 XT / RADV):tools/check_conventions.py --base origin/mainpassesTo pick it up:
Head is
de2677b43.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-13T00:19:34Z.
Conflicts with main in
docs/dev/debt/libkernel.md; please rebase. PPSA99420 only gets tomiQ1wVwSexEoncechflagsresolves (#4379), so list #4379 under Depends on and PPSA99420 under Unblocks.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T07:13:31Z.
Understood. PPSA99420 reaches getpriority only after its chflags import is resolved by #4379. I will add Depends on: #4379 and list PPSA99420 as the title this export unblocks after that prerequisite, without claiming the call is reachable before #4379 lands.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T07:37:43Z.
Rebased onto current
main, resolving the debt-file conflict by keeping main's entries and adding thegetpriorityentry. I listed #4379 underDepends onand PPSA99420 (#1578) underUnblocks, as requested. The prior Linux run predates this rebase; I have not rerun it locally, and the description now says so.Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-13T10:42:14Z.
Windows validation with title evidence (Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release,
BUILD_TESTING=ON, full build includinglibs; basemain2a2a3dc6):66cd9382merges cleanly and builds without warnings in the touched files;guest_sched_priority3/3; suite 688/689, the only failure beingpatched_libraries, broken onmainuntil #5025; conventions andgit diff --checkpass. PS5MC (PPSA99420) alone still stops earlier atchflags(ixrw0h2tWuI, #4379); stacked on #4379 it moves fromFAIL: unresolved ELF import miQ1wVwSexE from libkernel.prxtoFAIL: unresolved ELF import hpoDTzy9Yy0 from libkernel.prx(sigpending, #4383). The only overlap with #4379 is both appending a bullet todocs/dev/debt/libkernel.md.Imported from boykopovar/AnyPS5. Originally posted by p3n1cillin on 2026-10-13T14:10:48Z.
Title run with this PR: Windows 11, MinGW GCC 15.2.0 (WinLibs), Release. Built on
main3faa9cb40merged with this PR and the other open PRs that the catalog titles below need (#4377, #4379, #4374, #4383, #3798, #4863, #4105, my #5013/#5061/#5078/#5098/#5009 and the carries #5183/#5186, plus screamm'schrootbranch from #3632); every title converted from its catalog release,eboot.binkept inapp0, 60 s runs.getpriorityconflicts textually with #5061'sgetdtablesizeinProcess.cppanddocs/dev/debt/libkernel.md(both add a function aftergetrlimit); keeping both is enough.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-13T19:05:44Z.
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)core/libs/prx/libkernel/System/src/Process.cppL550Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-13T21:36:38Z.
Rebased onto main after #4379 and pushed here, author kept. The only conflict was
docs/dev/debt/libkernel.md, where both entries are kept (chflagsfrom #4379,getpriorityfrom this PR). Merging on a green full build.