feat(libkernel): implement pthread_attr_setsolosched_np #3176
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3176"
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 adriadam10 on 2026-10-11T00:12:08Z.
What
Carries @screamm's branch from #3148 (
feat/libkernel-setsolosched-np, commit7d7901b3kept as is, with its authorship). Intake is paused for new contributors and the issue asks a maintainer to carry it.pthread_attr_setsolosched_np(2+pVfgiEd7A) was aNotImplementedstub with no parameters, while its SCE twinscePthreadAttrSetsoloschedis implemented. It now:(pthread_attr_t*, int);EINVAL(22) for a null or uninitialised attribute, like the other POSIX attribute setters;scePthreadAttrSetsolosched, soscePthreadAttrGetsoloschedreads it back.The signature follows the SCE twin (KytyPS5
PthreadAttrSetsolosched). The value isn't applied to host scheduling.Title that stops on it on
main: Returnal (PPSA01285 v03.000.005), withwhat(): pthread_attr_setsolosched_np_nid_postfix not implemented(#3148, also reported in #2872 and #1155). LEGO Horizon Adventures (PPSA14632) and Palworld (PPSA23126) import it too.My commit only moves the TechnicalDebt line from the end of "Functional" to "Unknown function info", next to the other libkernel thread entries, since the signature is inferred from the twin.
Tested
guest_pthread_attrpasses. The test checks:EINVALfor null, uninitialised and destroyed attributes;scePthreadAttrGetsolosched.mainthe test stops on theNotImplementedthrow.tools/check_conventions.pypasses.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)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T00:12:28Z.
Progress report (
942a174→8d90c1f)📈 System libraries: 85.65% (+0.03%, +1 implemented functions)
✅ 1 implemented
pthread_attr_setsolosched_np_nid_postfixImported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-11T00:22:01Z.
Review: COMMENTED
Two things are worth separating here, because one of them is the reason this PR exists at all.
The implementation is right — and it is the one #3168 carried. The signature takes
(pthread_attr_t*, int), a null or uninitialised attribute returns the guestEINVALlike the other attribute setters, and the value goes throughscePthreadAttrSetsoloschedsoscePthreadAttrGetsoloschedreads it back — the same three lines #3168 changed the same function to, byte for byte. With #3168 closed, this is the version of that change that is live.This is the better of the two, in two specific ways, and both are worth keeping. The assertions are factored into a
CheckSoloSched()case the way the other attribute tests are structured, and it adds a check the earlier one did not have: a destroyed attribute comes backGUEST_EINVALas well. The debt line also moves out of "Functional" and into "Unknown function info" with the source links and the title evidence behind it, which is where someone asking "is this a real stop or a table row" will look. Carrying screamm's change with their authorship and putting the debt move in its own commit is the right division.The
EINVALfor an uninitialised attribute is the detail worth keeping.Valid(attr)rejecting both a null pointer and a null handle is what the neighbouring setters do, and the test's two rejected calls followed by a successful set-and-read is what shows the distinction instead of asserting it.The acceptance bar is answered properly. Returnal reaching it with that exact
what():line, the two other titles that import it, and the cross-references to #2872 and #1155 give a reader everything needed to know this is a real stop — and the not-applied-to-host-scheduling limit is recorded where someone who later wonders why the value is stored but unused will find it.Written with AI assistance.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T00:25:03Z.
Merged with Linux CI red only on the three AGC tests that main has been failing since
3c46fa6f4(agc_unit_shadow,agc_driver_flat_apertures,agc_driver_image_packed16_load, main run 38097151664). Windows passed, andguest_pthread_attrpassed on both.