feat(libkernel): implement pthread_attr_setsolosched_np #1155

Closed
MathiasDevelopes wants to merge 1 commit from upstream-pr/1155 into main
MathiasDevelopes commented 2026-10-07 15:23:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MathiasDevelopes on 2026-10-07T15:23:12Z.


What

Implement pthread_attr_setsolosched_np (libkernel). It stores the solo scheduling flag through scePthreadAttrSetsolosched, so scePthreadAttrGetsolosched reads it back, and returns EINVAL for a null or uninitialized attribute, like the other POSIX attribute setters. It replaces the NotImplemented_nid_no_patch stub.

Tested

Linux (Ubuntu 24.04, GCC 13.3), Release with BUILD_TESTING=ON: full build, libs target, and ctest (396 passed, 0 failed; GPU tests skipped without a Vulkan device). guest_pthread_attr covers the set/get round trip and both EINVAL cases; it aborts without the change and passes with it. Not tested on Windows or with a title.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4774723855 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1155). Originally posted by [MathiasDevelopes](https://github.com/MathiasDevelopes) on 2026-10-07T15:23:12Z. --- ### What Implement `pthread_attr_setsolosched_np` (libkernel). It stores the solo scheduling flag through `scePthreadAttrSetsolosched`, so `scePthreadAttrGetsolosched` reads it back, and returns `EINVAL` for a null or uninitialized attribute, like the other POSIX attribute setters. It replaces the `NotImplemented_nid_no_patch` stub. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. --> Linux (Ubuntu 24.04, GCC 13.3), Release with `BUILD_TESTING=ON`: full build, `libs` target, and `ctest` (396 passed, 0 failed; GPU tests skipped without a Vulkan device). `guest_pthread_attr` covers the set/get round trip and both `EINVAL` cases; it aborts without the change and passes with it. Not tested on Windows or with a title. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
copilot-pull-request-reviewer[bot] commented 2026-10-07 15:23:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by copilot-pull-request-reviewer[bot] on 2026-10-07T15:23:18Z.

Review: COMMENTED


Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5444456657 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1155#pullrequestreview-5444456657). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/apps/copilot-pull-request-reviewer) on 2026-10-07T15:23:18Z. **Review:** COMMENTED --- Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
github-actions[bot] commented 2026-10-07 15:23:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-07T15:23:38Z.


Progress report (1e5bb88 → 7c0bd59)

📈 System libraries: 86.17% (+0.04%, +1 implemented functions)

✅ 1 implemented
Library Name
libkernel pthread_attr_setsolosched_np_nid_postfix
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6041009712 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1155#issuecomment-6041009712). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-07T15:23:38Z. --- <!-- progress-report --> ### Progress report (1e5bb88 → 7c0bd59) 📈 **System libraries**: 86.17% (+0.04%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libkernel | `pthread_attr_setsolosched_np_nid_postfix` | </details>
github-actions[bot] commented 2026-10-07 19:37:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-07T19:37:01Z.


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.

Pull request Conflicting files (lines on main) Same exports Same new files
#1220 core/libs/tests/GuestPthreadAttr.cpp L21
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6045399632 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1155#issuecomment-6045399632). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-07T19:37:01Z. --- <!-- pr-overlap --> 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**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #1220 | `core/libs/tests/GuestPthreadAttr.cpp` [L21](https://github.com/boykopovar/AnyPS5/blob/df16c4c256be3c44e03eb9149a6ce5f8e8a038b2/core/libs/tests/GuestPthreadAttr.cpp#L21) | | |
oneandonlydean commented 2026-10-08 03:25:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-08T03:25:49Z.


Which title reaches pthread_attr_setsolosched_np on main? With the title ID and the log line where it stops this can go in; otherwise I'll close it until one does. On #1258 the description says a title aborted on sceAudioOut2MasteringSetParam; please add its ID and that log line there, and it can go in.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6051540190 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1155#issuecomment-6051540190). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-08T03:25:49Z. --- Which title reaches `pthread_attr_setsolosched_np` on main? With the title ID and the log line where it stops this can go in; otherwise I'll close it until one does. On #1258 the description says a title aborted on `sceAudioOut2MasteringSetParam`; please add its ID and that log line there, and it can go in.
MathiasDevelopes commented 2026-10-08 03:52:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MathiasDevelopes on 2026-10-08T03:52:19Z.


Could not reproduce now, closing this without merge; if a title turns up that actually stops on it, I'll reopen with the title ID and log line.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6051810581 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1155#issuecomment-6051810581). Originally posted by [MathiasDevelopes](https://github.com/MathiasDevelopes) on 2026-10-08T03:52:19Z. --- Could not reproduce now, closing this without merge; if a title turns up that actually stops on it, I'll reopen with the title ID and log line.
CouchRiv commented 2026-10-10 17:15:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CouchRiv on 2026-10-10T17:15:46Z.


@MathiasDevelopes a title that stops on it: Returnal (PPSA01285 v03.000.005). On main 57f96fd2b it stops earlier, on two exports no library has; with #2872, which adds them, it passes eager binding and then stops at:

what(): pthread_attr_setsolosched_np_nid_postfix not implemented

Linux, RTX 4070 Ti. If you reopen this, I can run Returnal on your branch and post the next stop.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6100126699 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1155#issuecomment-6100126699). Originally posted by [CouchRiv](https://github.com/CouchRiv) on 2026-10-10T17:15:46Z. --- @MathiasDevelopes a title that stops on it: Returnal (PPSA01285 v03.000.005). On `main` 57f96fd2b it stops earlier, on two exports no library has; with #2872, which adds them, it passes eager binding and then stops at: ```text what(): pthread_attr_setsolosched_np_nid_postfix not implemented ``` Linux, RTX 4070 Ti. If you reopen this, I can run Returnal on your branch and post the next stop. AI-assisted: yes

Pull request closed

Sign in to join this conversation.
No reviewers
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!1155
No description provided.