feat(libkernel): implement pthread_set_name_np #1593

Closed
MarcZX10 wants to merge 1 commit from upstream-pr/1593 into main
MarcZX10 commented 2026-10-08 13:59:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-08T13:59:17Z.


What

Implement the FreeBSD pthread_set_name_np void API by applying the name to the guest thread through the existing rename implementation. Invalid thread/name errors are surfaced as exceptions because this API has no error return. The test verifies the stored thread name.

Tested

Linux, GCC 12.2.0: guest_pthread_attr passed; conventions check and git diff --check passed.

Checklist

  • Based on current main; no open PR implements pthread_set_name_np
  • One topic per PR
  • No comments or investigation files added
  • Generic FreeBSD pthread behavior
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4787925976 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1593). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-08T13:59:17Z. --- ### What Implement the FreeBSD `pthread_set_name_np` void API by applying the name to the guest thread through the existing rename implementation. Invalid thread/name errors are surfaced as exceptions because this API has no error return. The test verifies the stored thread name. ### Tested Linux, GCC 12.2.0: `guest_pthread_attr` passed; conventions check and `git diff --check` passed. ### Checklist - [x] Based on current `main`; no open PR implements `pthread_set_name_np` - [x] One topic per PR - [x] No comments or investigation files added - [x] Generic FreeBSD pthread behavior - [x] Depends on: none - [x] AI-assisted: yes
oneandonlydean commented 2026-10-08 19:20:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-08T19:20:11Z.


No title reaches pthread_set_name_np on main yet: the homebrew audit lists the import, but those titles stop earlier at other missing imports. Closing for now; reopen when it's a title's next stop on main, with the log line.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6067326402 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1593#issuecomment-6067326402). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-08T19:20:11Z. --- No title reaches `pthread_set_name_np` on main yet: the homebrew audit lists the import, but those titles stop earlier at other missing imports. Closing for now; reopen when it's a title's next stop on main, with the log line.

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