feat(libkernel): implement pthread_attr_setstack, pthread_attr_setstackaddr and pthread_attr_getstackaddr #1220

Closed
emirplus wants to merge 1 commit from upstream-pr/1220 into main
emirplus commented 2026-10-07 18:04:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by emirplus on 2026-10-07T18:04:21Z.


What

  • Implements pthread_attr_setstack_nid_postfix (-SrbXpGR1f0), pthread_attr_setstackaddr_nid_postfix (suCrEbr0xIQ), and pthread_attr_getstackaddr_nid_postfix (DxmIMUQ-wXY) in libkernel/Pthread/Posix/Attr.cpp.
  • Forwards to underlying scePthreadAttrSetstack and scePthreadAttrSetstackaddr with POSIX parameter validation and errno error codes.
  • Adds test cases in GuestPthreadAttr.cpp covering valid configurations, query round-trips, and invalid arguments.

Tested

  • Windows 11 x64, MinGW Clang 19: guest_pthread_attr_tests passed (100% test pass).
  • python tools/progress.py out: libraries increased to 2519/2928 (86.03%).

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:4776531401 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1220). Originally posted by [emirplus](https://github.com/emirplus) on 2026-10-07T18:04:21Z. --- ### What - Implements pthread_attr_setstack_nid_postfix (-SrbXpGR1f0), pthread_attr_setstackaddr_nid_postfix (suCrEbr0xIQ), and pthread_attr_getstackaddr_nid_postfix (DxmIMUQ-wXY) in libkernel/Pthread/Posix/Attr.cpp. - Forwards to underlying scePthreadAttrSetstack and scePthreadAttrSetstackaddr with POSIX parameter validation and errno error codes. - Adds test cases in GuestPthreadAttr.cpp covering valid configurations, query round-trips, and invalid arguments. ### Tested - Windows 11 x64, MinGW Clang 19: guest_pthread_attr_tests passed (100% test pass). - python tools/progress.py out: libraries increased to 2519/2928 (86.03%). ### Checklist - [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 - [x] Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt - [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
oneandonlydean commented 2026-10-08 02:44:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-08T02:44:34Z.


Closing: no title is shown to call pthread_attr_setstack, pthread_attr_setstackaddr or pthread_attr_getstackaddr, and the progress count alone isn't a reason to add them. If one does, comment here with the title ID and the log line where it stops.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6051105708 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1220#issuecomment-6051105708). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-08T02:44:34Z. --- Closing: no title is shown to call `pthread_attr_setstack`, `pthread_attr_setstackaddr` or `pthread_attr_getstackaddr`, and the progress count alone isn't a reason to add them. If one does, comment here with the title ID and the log line where it stops.

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!1220
No description provided.