libkernel: pthread_attr_getinheritsched, pthread_attr_getscope and pthread_attr_setscope are absent imports of 13 catalog titles; fix branch ready #3165
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 screamm on 2026-10-10T23:50:32Z.
libkernel does not export
pthread_attr_getinheritsched,pthread_attr_getscopeandpthread_attr_setscope(NIDsoLjPqUKhzes,e2G+cdEkOmU,xesmlSI-KCI, confirmed withtools/nid_names.pyagainst aerolib). An import audit of the homebrew catalog onmain262c0316(Windows, see my comment on #1578) lists all three as absent imports of 13 titles: PPSA19111, PPSA59322, PPSA68091 (Ruffle), PPSA76677, PPSA85300 (VLC), PPSA97358, PPSA97510, PPSA98510, PPSA99002, PPSA99010, PPSA99169 (RetroArch), PPSA99764 (Porpoise), PPSA99810 (PSBox). Each becomes a stop once the title's earlier stop (_umtx_op#1482,alarm#2765,execvp#2827) is passed; the closed #1912 was asked to return with such a log line.Fix branch ready:
screamm:feat/libkernel-attr-scope-inherit(3cbebab4, one commit onmain91b13413). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commit as is.thr_attr.c,thr_create.c,thr_init.cat5ed7eb0d): scope defaults to system (2) and accepts only process (0) or system (2), otherwise, or for a null attr or null output,EINVAL;getinheritschedreturnsEINVALfor a null attr and throws for a null output, which libthr writes through unchecked; the default isPTHREAD_INHERIT_SCHED(4) as the existingscePthreadAttrInitalready sets. The existingpthread_attr_setinheritschednow returnsENOTSUP(45) for values other than 4 or 0 as libthr does. A thread records its scope at creation (inherited from the creator under inherit-sched or taken from the attr), andpthread_attr_get_npandscePthreadAttrGetreport it, which fixes the stale scope field a reviewer found on #1912. Process scope has no effect on host threads; recorded in TechnicalDebt with the rest.guest_pthread_attrgains the defaults, round trips, invalid values leaving the stored value unchanged, null and destroyed attrs, the null-output cases, and the scope reported by both query paths for explicit and inherited scope.Tested on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release,
BUILD_TESTING=ON, full build includinglibs:guest_pthread_attr3/3;ctest -j8 -E "^agc_driver_|^video_out_flip"479/479; withmain'sPosix/Attr.cppthe extended test fails;tools/check_conventions.py --base mainandgit diff --checkpass. Not run on Linux. Thesetinheritschedtightening is beyond the three exports and could be split out if preferred.Written with Claude Code assistance (implementation by a subagent, reviewed and validated in this session).
Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-11T09:32:30Z.
Implemented and verified against FreeBSD 11 libthr and latest main (
3c3992c5c) in #3377 (branch pushkarreddyy:feat/libkernel-pthread-attr-scope-inherit).Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-11T09:52:53Z.
Independent verification on Linux (the gap noted in the report): CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
BUILD_TESTING=ON.3cbebab4onto currentmain(the branch was 605 commits behind): one conflict inGuestPthreadAttr.cpp(main added apthread_attr_setsolosched_npdeclaration where this branch declares its set; both kept) and one indocs/dev/TechnicalDebt.md(both entries kept); no implementation conflicts.tools/check_conventions.py --base origin/mainandgit diff --checkpass.guest_pthread_attrpasses.ctest -j8 -E "^agc_driver_|^video_out_flip"): 520/520 passed.The rebased branch is available at
blawesom:verify/3165for anyone carrying — the commit is otherwise unchanged.Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-11T09:57:19Z.
Huge thanks to @blawesom for the independent Linux test verification (520/520 test suite pass) and to @screamm for the original investigation identifying the 13 catalog titles unblocked by these exports!
PR #3377 (
pushkarreddyy:feat/libkernel-pthread-attr-scope-inherit) is submitted based on latestmain(3c3992c5c), with cleanpthread_attr_setsolosched_npintegration, FreeBSD 11libthrconformance, and in-sectionTechnicalDebt.mddocumentation. Ready for @MarcZX100 / @adriadam10 / @oneandonlydean to carry or merge.Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-11T11:39:57Z.
Title evidence on current
main(0f863c10, Windows 11, WinLibs GCC 15.2.0 r7, Release, fresh relink with--windows --registry unused-filter=0): six catalog titles now havepthread_attr_getscopeas their first stop, with the log linePPSA19111, PPSA59322, PPSA76677, PPSA99002, PPSA99010 and PPSA99810 (PSBox Cloud Gaming). Last night their first stops were
_umtx_op,sceAudioInInitand friends, all merged since, so this is now the next stop onmainfor all six. The branch above (3cbebab4) and pushkarreddyy's #3377 both cover it; whichever is carried, this is the log line the merge rule asks for.Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-11T11:49:41Z.
Thank you @screamm for the empirical log line validation on current main (
Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-12T05:53:01Z.
Implementation note for housekeeping: this issue's exports (
pthread_attr_getinheritsched,pthread_attr_getscope,pthread_attr_setscope) landed onmainvia #3494 (merged 2026-10-11).Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-12T06:16:58Z.
Closing: fixed by #3494. The three exports are on main (
Pthread/Posix/Attr.cpp). Reopen if a title still reports one of them as unresolved on current main.