kernel: name guest threads on the host #1106
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!1106
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1106/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@oberdfr on GitHub · 2026-10-06 14:14 UTC · original
oberdfr:upstream-clean→main· +5 −0 · 1 files · 1 commits · merged 2026-10-06 19:43 UTCPthreadCreate carries a guest thread name, but RunThread did not pass it to the host, so guest threads appeared under a generic host thread name in diagnostics.
Call pthread_setname_np() on Linux for nonempty guest thread names, truncated to the 15-character host limit. This PR contains only the pthread naming change in src/kernel/pthread.cpp.
Validation: verified that the PR contains one commit and only the five-line pthread naming addition; git diff --check passes. No new build or runtime tests were run for this scope reduction.
@coderabbitai[bot] on GitHub · 2026-10-06 14:18 UTC · original · edited 2026-10-06 19:42 UTC
📝 Walkthrough
Walkthrough
The change updates PRT aperture and direct-memory range handling, sets Linux host thread names from guest thread names, and adds four LibNet socket wrappers with symbol-table registrations.
Suggested reviewers:
nmzikPriority: ➖ Normal
Change: Bug fix
Merge Risk: 🟡 Moderate · up to
29169The network wrappers and Linux thread naming look low risk. The PRT aperture changes can corrupt the virtual-range bookkeeping, though. Clearing an aperture that holds mapped memory can make a later memory release crash the emulator. An aperture that overlaps existing ranges can also be reported as set without being reserved. Fix both before merging.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.@coderabbitai[bot] on GitHub · 2026-10-06 14:18 UTC · original
On
src/kernel/memory.cppline 2434 (outdated):🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Preserve mappings when an aperture is cleared.
If a direct mapping replaces part of an aperture’s
Reservedspan,Remove(old.address, old.size)also deletes theDirectentry. The physical mapping remains. A later direct-memory release then fails the ownership check inReleaseDirectMemoryInternaland terminates the emulator. Remove only aperture-owned reserved spans, and keep committed mappings in the virtual range table.@coderabbitai[bot] on GitHub · 2026-10-06 14:18 UTC · original
On
src/kernel/memory.cppline 2442 (outdated):🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Handle failure to register the aperture range.
If the requested aperture overlaps an existing virtual range,
VirtualRanges::Addreturns false.KernelSetPrtAperturenevertheless records the aperture and returnsOK. The aperture then appears inKernelGetPrtApertureandIsInPrtAperturewithout the intended reserved range. Check registration before publishing the aperture state, and return an error when registration fails.@coderabbitai[bot] on GitHub · 2026-10-06 14:18 UTC · original · reviewed
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
680460d6-b413-4f51-bd0c-71a370d641fb📥 Commits
Reviewing files that changed from the base of the PR and between
fb7ff7ec03and 291692796c22bea4e52c1be30b3ce319f4f36030.📒 Files selected for processing (3)
src/kernel/memory.cppsrc/kernel/pthread.cppsrc/libs/libNet.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
@defektu on GitHub · 2026-10-06 17:46 UTC · original
#1093 LibNet parts have similarities. Commit c937236 looks as if it was taken from #1093.
@Nmzik on GitHub · 2026-10-06 19:40 UTC · original · edited 2026-10-06 19:44 UTC