Repository navigation
Conversation
pthread_set_name_np renames through scePthreadRename; a null name clears it, as in FreeBSD. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dextroid17
left a comment
There was a problem hiding this comment.
Verified on Linux — the differential holds, which is the half the "Tested" line could not cover.
- Arm A (this PR):
cmake --build build --target guest_thread_self_tests --parallel 16→ clean; the binary runs and passes, exit 0. - Arm B (control): the implementation file back at
mainwith the new test kept → the target fails to link:
GuestThreadSelf.cpp:(.text.startup+0x206): undefined reference to `pthread_set_name_np_nid_postfix'
So the test cannot even run without the export, and its behavioural assertions are what carry the rest.
Claim cross-check: it delegates to scePthreadRename(thread, name != nullptr ? name : "") (Pthread/Posix/Thread.cpp:72) and returns void, so the null name clears the name and a failure (a null thread) is ignored, as the FreeBSD original does — the behaviour the body describes.
The titles are named (Quake II PPSA99007) — that is exactly the part reviewers ask for, and it is here.
Not verified: Windows (the author's platform), and behaviour beyond what this test asserts.
Written with AI assistance.
|
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.
|
|
Closing: Quake II (PPSA99007) stops at |
|
This is now a title's next stop on current Checked 25f95d9 merged onto
Example lines for ScreenTester5 (PPSA69420): |
|
Another title that stops here on current |
|
@oneandonlydean the reopen condition is met:
I rebased the branch onto current Could you reopen it? GitHub doesn't let me reopen a PR a maintainer closed. Thanks @babyhuey and @overlordxrz-source for the runs. AI-assisted (Claude Code). |
|
Jelly5 (PPSA99505) also stops here, after its
The full library set rebuilt with both branches gives the same stop. AI-assisted: yes (Claude Code). |
|
More titles stop here, from a triage of the whole homebrew catalog on
The "with this branch" column comes from one build of AI-assisted (Claude Code). |
|
Update for current Checked 25f95d9 merged onto
Example lines for EVO Player: Titles that reach |
|
@TheAggie in case it helps: with the intake check now at 10 merged PRs and the title lines above, this can go up again as a new PR (a closed PR can't be reopened by its author once a maintainer closed it). |
What
pthread_set_name_npwas not exported. Quake II (PPSA99007, the homebrew port) calls it.It renames through the existing
scePthreadRename. A null name clears the name, as in FreeBSD. Like FreeBSD's version it returns nothing, so a failure (for example a null thread) is ignored.Test (
guest_thread_self): the main thread's name reads back throughscePthreadGetnameafter a rename, is empty after a null name, and a null thread does nothing.Related: #1798 implements
pthread_getname_np; no overlap.Tested
Windows 11 Pro (26200), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release.
mainwith this PR and four other small libc/libkernel PRs of mine merged together (atol, getprogname, dup2, ctime/rewind, pthread_set_name_np). It was run from the generatedCTestTestfile.cmakecommands because antivirus blocksctest.exeon this machine.tools/check_conventions.py --base origin/mainpasses on this branch alone.Not tested on Linux or macOS.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code