fix(libkernel): give an inheriting thread its creator's priority #5230
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5230"
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 hugodearaujo on 2026-10-13T15:17:01Z.
What
A thread created with inherited scheduling took the priority stored in its attribute. On the console it runs at its creator's priority. I created threads from a homebrew payload on a PS5 (firmware 13.60), with the creator set to 450 and then to 600 through
scePthreadSetprio, and read the child's priority withscePthreadGetschedparam:mainPTHREAD_INHERIT_SCHED, priority 300 setPTHREAD_INHERIT_SCHED, no priority setscePthreadCreate,pthread_create)pthread_create)PTHREAD_EXPLICIT_SCHED, priority 300 setPTHREAD_EXPLICIT_SCHED, no priority setThe policy already followed this rule (#4086); the priority now does too. The TechnicalDebt sentence that recorded the difference is updated.
Titles, from a run on Linux with logging added to
scePthreadCreate:scePthreadGetschedparam.sndz_stream_task_service,tbb_thead) are created with inherited scheduling from creators at 699 and 680 and got 700.Tested
guest_pthread_schedparamnow also creates threads from a guest thread at 450 and 600 with each attribute in the table; it aborts onmain.agc_driver_tessellationsegfaults the same way on currentmain.guest_pthread_schedparampasses.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
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-14T18:08:57Z.
Checked the new priority rule in
PthreadPrivate(inherit → creator's priority, explicit or no creator → attribute's), the removed duplicate store inscePthreadCreate, and the TechnicalDebt update.guest_pthread_schedparamaborts without the change and passes with it; scoped build and ctest are green. Merging once the full build is green.