libkernel: pthread_attr_setsolosched_np stops Returnal (PPSA01285); fix branch ready #3148

Closed
opened 2026-10-10 23:15:58 +00:00 by screamm · 2 comments
screamm commented 2026-10-10 23:15:58 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-10T23:15:58Z.


pthread_attr_setsolosched_np (libkernel, NID 2+pVfgiEd7A) is a NotImplemented_nid_no_patch stub while its SCE twin scePthreadAttrSetsolosched is implemented. Returnal (PPSA01285 v03.000.005) stops on it after eager binding, as CouchRiv reported in #2872 and #1155:

what(): pthread_attr_setsolosched_np_nid_postfix not implemented

LEGO Horizon Adventures (PPSA14632, #734) and Palworld (PPSA23126, #2598) import it.

Fix branch ready: screamm:feat/libkernel-setsolosched-np (7d7901b3, one commit on main d2f43cb8). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commit as is. Earlier single-purpose PRs (#3016, #2658, #2446, #1155) were closed by intake or for lack of a title; this one carries the title and log line above.

  • The alias takes (attr, int), returns EINVAL (22) for a null or uninitialised attribute like the neighbouring POSIX setters, and stores the value through scePthreadAttrSetsolosched, returning its result in errno form. The signature and the stored int follow the SCE twin here and in KytyPS5 and sharpemu; PS5PCEM defines the alias the same way. The value is not applied to scheduling (nothing reads it), recorded in TechnicalDebt together with the unverified acceptance of values other than 0 and 1.
  • guest_pthread_attr gains null, uninitialised and destroyed attributes returning 22, the default 0, and 1 then 0 read back through scePthreadAttrGetsolosched.

Tested on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release, BUILD_TESTING=ON, full build including libs: guest_pthread_attr 3/3; ctest -j8 -E "^agc_driver_|^video_out_flip" 475/475; with main's Posix/Attr.cpp the extended test fails; tools/check_conventions.py --base main and git diff --check pass. Not run on Linux.

Written with Claude Code assistance (implementation by a subagent, reviewed and validated in this session).

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5796150277 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3148). Originally posted by [screamm](https://github.com/screamm) on 2026-10-10T23:15:58Z. --- `pthread_attr_setsolosched_np` (libkernel, NID `2+pVfgiEd7A`) is a `NotImplemented_nid_no_patch` stub while its SCE twin `scePthreadAttrSetsolosched` is implemented. Returnal (PPSA01285 v03.000.005) stops on it after eager binding, as CouchRiv reported in #2872 and #1155: ``` what(): pthread_attr_setsolosched_np_nid_postfix not implemented ``` LEGO Horizon Adventures (PPSA14632, #734) and Palworld (PPSA23126, #2598) import it. **Fix branch ready:** [`screamm:feat/libkernel-setsolosched-np`](https://github.com/screamm/AnyPS5/tree/feat/libkernel-setsolosched-np) (`7d7901b3`, one commit on `main` `d2f43cb8`). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commit as is. Earlier single-purpose PRs (#3016, #2658, #2446, #1155) were closed by intake or for lack of a title; this one carries the title and log line above. - The alias takes `(attr, int)`, returns `EINVAL` (22) for a null or uninitialised attribute like the neighbouring POSIX setters, and stores the value through `scePthreadAttrSetsolosched`, returning its result in errno form. The signature and the stored int follow the SCE twin here and in KytyPS5 and sharpemu; PS5PCEM defines the alias the same way. The value is not applied to scheduling (nothing reads it), recorded in TechnicalDebt together with the unverified acceptance of values other than 0 and 1. - `guest_pthread_attr` gains null, uninitialised and destroyed attributes returning 22, the default 0, and 1 then 0 read back through `scePthreadAttrGetsolosched`. **Tested** on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release, `BUILD_TESTING=ON`, full build including `libs`: `guest_pthread_attr` 3/3; `ctest -j8 -E "^agc_driver_|^video_out_flip"` 475/475; with `main`'s `Posix/Attr.cpp` the extended test fails; `tools/check_conventions.py --base main` and `git diff --check` pass. Not run on Linux. Written with Claude Code assistance (implementation by a subagent, reviewed and validated in this session).
adriadam10 commented 2026-10-11 00:12:16 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T00:12:16Z.


Carried in #3176 with your commit as is; the only change on top moves the TechnicalDebt line to "Unknown function info".

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6103634003 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3148#issuecomment-6103634003). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T00:12:16Z. --- Carried in #3176 with your commit as is; the only change on top moves the TechnicalDebt line to "Unknown function info".
adriadam10 commented 2026-10-11 00:25:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T00:25:05Z.


Fixed by #3176.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6103732264 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3148#issuecomment-6103732264). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T00:25:05Z. --- Fixed by #3176.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#3148
No description provided.