feat(libkernel): implement shm_unlink #3250

Closed
pushkarreddyy wants to merge 1 commit from upstream-pr/3250 into main
pushkarreddyy commented 2026-10-11 03:29:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-11T03:29:04Z.


What

Implement shm_unlink (NID tPWsbOUGO8k) in libkernel.

  • Follows FreeBSD 11.4 sys_shm_unlink error handling:
    • Null path returns -1 and sets *__error_nid_postfix() = 14 (EFAULT).
    • Anonymous descriptor path == anonymousObject (SHM_ANON) returns -1 and sets *__error_nid_postfix() = 22 (EINVAL).
    • Empty path *path == '\0' returns -1 and sets *__error_nid_postfix() = 2 (ENOENT).
    • Named objects throw NotImplemented_nid_no_patch("shm_unlink of a named object") matching shm_open.
  • Extended GuestShmOpen.cpp test suite covering nullptr, anonymousObject, empty string, and named object throws.
  • Updated docs/dev/TechnicalDebt.md.

Pairs with existing shm_open used by native titles and ports (e.g. PPSA99010 vkQuake and homebrew apps).

Tested

  • Windows 11 host.
  • Verified test suite: GuestShmOpen passes.
  • Verified conventions: python tools/check_conventions.py --base origin/main reports 0 errors.

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:4816287088 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3250). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-11T03:29:04Z. --- ### What Implement `shm_unlink` (NID `tPWsbOUGO8k`) in `libkernel`. - Follows FreeBSD 11.4 `sys_shm_unlink` error handling: - Null `path` returns -1 and sets `*__error_nid_postfix() = 14` (`EFAULT`). - Anonymous descriptor `path == anonymousObject` (`SHM_ANON`) returns -1 and sets `*__error_nid_postfix() = 22` (`EINVAL`). - Empty path `*path == '\0'` returns -1 and sets `*__error_nid_postfix() = 2` (`ENOENT`). - Named objects throw `NotImplemented_nid_no_patch("shm_unlink of a named object")` matching `shm_open`. - Extended `GuestShmOpen.cpp` test suite covering `nullptr`, `anonymousObject`, empty string, and named object throws. - Updated `docs/dev/TechnicalDebt.md`. Pairs with existing `shm_open` used by native titles and ports (e.g. `PPSA99010` vkQuake and homebrew apps). ### Tested - Windows 11 host. - Verified test suite: `GuestShmOpen` passes. - Verified conventions: `python tools/check_conventions.py --base origin/main` reports 0 errors. ### 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](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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
github-actions[bot] commented 2026-10-11 03:29:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T03:29:15Z.


Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6105029213 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3250#issuecomment-6105029213). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T03:29:15Z. --- Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.
github-actions[bot] commented 2026-10-11 03:29:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T03:29:24Z.


Progress report (961b25f → 31c3d91)

📉 System libraries: 85.98% (-0.02%, +1 declared functions)

🆕 1 declared as stubs
Library Name
libkernel shm_unlink_nid_postfix
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6105030271 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3250#issuecomment-6105030271). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T03:29:24Z. --- <!-- progress-report --> ### Progress report (961b25f → 31c3d91) 📉 **System libraries**: 85.98% (-0.02%, +1 declared functions) <details> <summary>🆕 1 declared as stubs</summary> | Library | Name | | - | - | | libkernel | `shm_unlink_nid_postfix` | </details>
pushkarreddyy commented 2026-10-11 06:38:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-11T06:38:48Z.


The intake check closed this automatically. @oneandonlydean @MarcZX100 @adriadam10: Could one of you please reopen or carry this when convenient? It implements shm_unlink (PPSA99010 vkQuake), tracked in issue #3251. It is cleanly rebased, mergeable onto current main (1690db9a2) with Mergeable: True, and passes all conventions and unit tests.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6106318641 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3250#issuecomment-6106318641). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-11T06:38:48Z. --- The intake check closed this automatically. @oneandonlydean @MarcZX100 @adriadam10: Could one of you please reopen or carry this when convenient? It implements `shm_unlink` (PPSA99010 vkQuake), tracked in issue #3251. It is cleanly rebased, mergeable onto current `main` (`1690db9a2`) with `Mergeable: True`, and passes all conventions and unit tests.

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