feat(libkernel): resolve syscall, equeue, shm and threading stubs #9823

Closed
Delciob wants to merge 1 commit from upstream-pr/9823 into main
Delciob commented 2026-10-22 16:20:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Delciob on 2026-10-22T16:20:00Z.


What

Implement missing syscall, equeue, shm and threading stubs in libkernel.

Tested

Windows 10 x64, kernel threading and equeue tests.

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: none
  • GPUs tested: n/a
  • AI-assisted: no
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4970599155 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9823). Originally posted by [Delciob](https://github.com/Delciob) on 2026-10-22T16:20:00Z. --- ### What Implement missing syscall, equeue, shm and threading stubs in libkernel. ### Tested Windows 10 x64, kernel threading and equeue tests. ### 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 under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [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] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: no
MarcZX10 commented 2026-10-22 16:44:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T16:44:53Z.

Review: CHANGES_REQUESTED


I reviewed head 8bad93b62c7641caa969ff53d6f9800bb50e37b0. Most of the patch does not implement the advertised syscall/equeue/shared-memory/threading behavior: it replaces NotImplemented_nid_no_patch(...) with direct throw std::runtime_error(...) calls for unsupported filters, affinity/priority requests, named shared memory and related cases. CONTRIBUTING.md specifically requires unimplemented exports to call NotImplemented_nid_no_patch; these changes bypass that contract without adding behavior or tests. Please retain the prescribed helper for unsupported cases.

The two behavior changes also need evidence and focused tests: nmount now returns EOPNOTSUPP instead of the existing explicit unimplemented path, and sceCoredumpSetUserDataType now always returns NOT_IN_COREDUMP_HANDLER. The PR only states “Windows 10 x64, kernel threading and equeue tests” and gives no commands or results, and it adds no tests for these changes.

python3 tools/check_conventions.py --base upstream/main and git diff --check pass. The current-main merge-tree check reports conflicts in Equeue.cpp, Kqueue.cpp, SyncOnAddress.cpp, and Coredump.cpp. Please update and resolve those before merge, restore the required helper calls for unimplemented branches, and document/test any behavior changes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5617723476 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9823#pullrequestreview-5617723476). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T16:44:53Z. **Review:** CHANGES_REQUESTED --- I reviewed head `8bad93b62c7641caa969ff53d6f9800bb50e37b0`. Most of the patch does not implement the advertised syscall/equeue/shared-memory/threading behavior: it replaces `NotImplemented_nid_no_patch(...)` with direct `throw std::runtime_error(...)` calls for unsupported filters, affinity/priority requests, named shared memory and related cases. `CONTRIBUTING.md` specifically requires unimplemented exports to call `NotImplemented_nid_no_patch`; these changes bypass that contract without adding behavior or tests. Please retain the prescribed helper for unsupported cases. The two behavior changes also need evidence and focused tests: `nmount` now returns `EOPNOTSUPP` instead of the existing explicit unimplemented path, and `sceCoredumpSetUserDataType` now always returns `NOT_IN_COREDUMP_HANDLER`. The PR only states “Windows 10 x64, kernel threading and equeue tests” and gives no commands or results, and it adds no tests for these changes. `python3 tools/check_conventions.py --base upstream/main` and `git diff --check` pass. The current-main merge-tree check reports conflicts in `Equeue.cpp`, `Kqueue.cpp`, `SyncOnAddress.cpp`, and `Coredump.cpp`. Please update and resolve those before merge, restore the required helper calls for unimplemented branches, and document/test any behavior changes.
MarcZX10 commented 2026-10-22 17:30:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T17:30:39Z.

Review: CHANGES_REQUESTED


Several unimplemented paths are changed from NotImplemented_nid_no_patch to direct std::runtime_error throws (for example kevent filters, unsupported descriptor filters, cpuset_* scopes, rtprio_thread, and _umtx_op). This conflicts with CONTRIBUTING.md, which specifically requires unimplemented exports to call NotImplemented_nid_no_patch; that helper preserves the repository’s standard unimplemented-path diagnostic. Please keep those paths on the helper unless this PR implements the behavior. The PR also changes nmount from a throw to EOPNOTSUPP and sceCoredumpSetUserDataType to a specific error code, but the description reports only threading/equeue runs and adds no regression coverage for these new results. Please provide evidence for those return values and tests that exercise them, or retain the existing unimplemented behavior. The conventions/intake/labels checks pass; hosted product builds are skipped.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5618284327 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9823#pullrequestreview-5618284327). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T17:30:39Z. **Review:** CHANGES_REQUESTED --- Several unimplemented paths are changed from `NotImplemented_nid_no_patch` to direct `std::runtime_error` throws (for example `kevent` filters, unsupported descriptor filters, `cpuset_*` scopes, `rtprio_thread`, and `_umtx_op`). This conflicts with `CONTRIBUTING.md`, which specifically requires unimplemented exports to call `NotImplemented_nid_no_patch`; that helper preserves the repository’s standard unimplemented-path diagnostic. Please keep those paths on the helper unless this PR implements the behavior. The PR also changes `nmount` from a throw to `EOPNOTSUPP` and `sceCoredumpSetUserDataType` to a specific error code, but the description reports only threading/equeue runs and adds no regression coverage for these new results. Please provide evidence for those return values and tests that exercise them, or retain the existing unimplemented behavior. The conventions/intake/labels checks pass; hosted product builds are skipped.
MarcZX10 commented 2026-10-22 20:08:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T20:08:23Z.

Review: CHANGES_REQUESTED


The PR body says these syscall/equeue/SHM/threading stubs are implemented, but most changed paths still have no implementation: the patch replaces NotImplemented_nid_no_patch(...) with raw std::runtime_error(...) at the same unsupported cases. AGENTS.md explicitly requires an unimplemented export to call NotImplemented_nid_no_patch(__func__) and says never to return made-up success. Please keep the project helper on unimplemented paths and scope this PR to behavior that is actually implemented and tested; otherwise the progress report counts throwing exports as implemented. The Windows “kernel threading and equeue tests” line does not identify cases/results for these changed branches.

There is also a concrete overlap with open #9843: both edit core/libs/prx/libkernel/Equeue/src/Kqueue.cpp around low-water/unsupported kevent behavior, while this checklist says Depends on: none. CONTRIBUTING requires the authors to agree which overlapping change goes first and record the dependency/order. The branch is based on 11f976b2, 44 commits behind current main a6646f84; please rebase and rerun the focused tests after resolving that overlap. CI conventions/intake/labels pass; product jobs are skipped. I did not run local kernel tests.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5620198214 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9823#pullrequestreview-5620198214). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T20:08:23Z. **Review:** CHANGES_REQUESTED --- The PR body says these syscall/equeue/SHM/threading stubs are implemented, but most changed paths still have no implementation: the patch replaces `NotImplemented_nid_no_patch(...)` with raw `std::runtime_error(...)` at the same unsupported cases. `AGENTS.md` explicitly requires an unimplemented export to call `NotImplemented_nid_no_patch(__func__)` and says never to return made-up success. Please keep the project helper on unimplemented paths and scope this PR to behavior that is actually implemented and tested; otherwise the progress report counts throwing exports as implemented. The Windows “kernel threading and equeue tests” line does not identify cases/results for these changed branches. There is also a concrete overlap with open #9843: both edit `core/libs/prx/libkernel/Equeue/src/Kqueue.cpp` around low-water/unsupported `kevent` behavior, while this checklist says `Depends on: none`. CONTRIBUTING requires the authors to agree which overlapping change goes first and record the dependency/order. The branch is based on `11f976b2`, 44 commits behind current `main` `a6646f84`; please rebase and rerun the focused tests after resolving that overlap. CI conventions/intake/labels pass; product jobs are skipped. I did not run local kernel 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!9823
No description provided.