Skip to content

feat(libkernel): implement pthread_condattr_setpshared - #7225

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
nicolasfalesy:feat/libkernel-condattr-setpshared
Oct 17, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
nicolasfalesy:feat/libkernel-condattr-setpshared

Conversation

@nicolasfalesy

@nicolasfalesy nicolasfalesy commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

What

Implements pthread_condattr_setpshared (3BpP850hBT4) in libkernel. PSFlyCast (PPSA99247) imports it and fails to load on current main (66702f1):

./app.elf: symbol lookup error: ./app.elf: undefined symbol: 3BpP850hBT4

The attribute stores PTHREAD_PROCESS_PRIVATE (0) or PTHREAD_PROCESS_SHARED (1). A null or uninitialized attribute and any other value return EINVAL without changing it, following FreeBSD 11 libthr thr_condattr.c and this repo's pthread_mutexattr_setpshared. Sharing across processes is not modeled, as for mutexes (technical debt entry added). #3930 had this function but was closed by its author for lack of a title log; this PR has one.

Tested

Arch Linux, Intel Core Ultra X7 358H + Intel Arc (Mesa ANV), on main 66702f1.

  • guest_pthread_condattr passes, with new cases for null/uninitialized attributes, 0 and 1 accepted, -1 and 2 rejected.
  • PSFlyCast (PPSA99247, catalog build), relinked with --to-intel: on main it stops at load with the line above; with this PR it runs 40 s and shows its "Your library is empty" screen.
  • tools/check_conventions.py --base upstream/main passes.

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 under Silent stubs in their library's technical debt file
  • 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
  • Fixes: none
  • Unblocks: PPSA99247 (no Game bring-up discussion yet)
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

https://claude.ai/code/session_01Sovthwyu4H63RMbRVha2Sy

PSFlyCast (PPSA99247) imports pthread_condattr_setpshared (3BpP850hBT4)
from libkernel and fails to load without it:
"./app.elf: symbol lookup error: ./app.elf: undefined symbol: 3BpP850hBT4".

The attribute stores PTHREAD_PROCESS_PRIVATE (0) or
PTHREAD_PROCESS_SHARED (1); a null or uninitialized attribute and any
other value return EINVAL without changing it, following FreeBSD 11
libthr thr_condattr.c and pthread_mutexattr_setpshared here. Sharing
across processes is not modeled, as for mutexes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sovthwyu4H63RMbRVha2Sy
@github-actions

Copy link
Copy Markdown

Progress report (e1041f6 → 05b457d)

➖ System libraries: 89.65% (+0.0%, +1 implemented functions)

✅ 1 implemented
Library Name
libkernel pthread_condattr_setpshared_nid_postfix

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5021 core/libs/prx/libkernel/Pthread/include/Pthread.hpp
docs/dev/debt/libkernel.md
PR 6222 core/libs/prx/libkernel/Pthread/include/Pthread.hpp
docs/dev/debt/libkernel.md
PR 6228 docs/dev/debt/libkernel.md
PR 6343 docs/dev/debt/libkernel.md
PR 6510 docs/dev/debt/libkernel.md
PR 6542 docs/dev/debt/libkernel.md
PR 6710 docs/dev/debt/libkernel.md
PR 6908 docs/dev/debt/libkernel.md
PR 6962 docs/dev/debt/libkernel.md
PR 7049 docs/dev/debt/libkernel.md
PR 7075 docs/dev/debt/libkernel.md
PR 7088 docs/dev/debt/libkernel.md
PR 7121 docs/dev/debt/libkernel.md
PR 7129 docs/dev/debt/libkernel.md
PR 7135 core/libs/prx/libkernel/Pthread/include/Pthread.hpp
docs/dev/debt/libkernel.md
PR 7139 docs/dev/debt/libkernel.md
PR 7248 docs/dev/debt/libkernel.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants