Skip to content

feat(libkernel): implement sceKernelGetEventError - #3638

Closed
ZekriDev1 wants to merge 1 commit into
boykopovar:mainfrom
ZekriDev1:fix/libkernel-equeue-get-event-error
Closed

ZekriDev1 wants to merge 1 commit into
boykopovar:mainfrom
ZekriDev1:fix/libkernel-equeue-get-event-error

Conversation

@ZekriDev1

Copy link
Copy Markdown

What

Implements sceKernelGetEventError (libkernel/Equeue): null event throws via the shared requireEvent helper (same as all sibling accessors); otherwise returns (int)data when EV_ERROR is set in flags, else 0. Uses the existing in-repo EV_ERROR (Equeue.hpp). Needed so titles reading kqueue/kevent results (cf. TechnicalDebt.md kqueue/kevent titles) get the standard BSD error channel instead of a throw-on-any-call stub. Evidence: FreeBSD sys/sys/event.h (EV_ERROR 0x4000, data contains errno; struct kevent layout matches KernelEvent). Generic behavior, one function, no new dependencies. Uncertainty: console errno values and EV_ERROR production sites unverified; emulator-generated events currently never carry it.

Tested

  • python3 tools/check_conventions.py --base a11c8f7 --head HEAD → pass.
  • python3 -m unittest discover -s tools/tests → 95 tests OK.
  • python3 tools/progress.py → 2904/3383 (85.84%), +1 implemented, not inert.
  • Full cmake build / ctest / GuestEqueueEvents run: not run — no toolchain (cmake/ninja/compiler absent) and submodules uninitialized. Test was written to fail if reverted but not executed here.

Checklist

  • Based on current main; no other open PR implements the same functions (upstream/main = a11c8f7, branch base verified)
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt (no // added; verified via conventions check)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt (no new silent stub; this path is implemented)
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title (FreeBSD kevent semantics)
  • Depends on: none
  • AI-assisted: yes

@github-actions

Copy link
Copy Markdown

Progress report (a11c8f7 → f27c8a9)

📈 System libraries: 85.84% (+0.03%, +1 implemented functions)

✅ 1 implemented
Library Name
libkernel sceKernelGetEventError

@blawesom

Copy link
Copy Markdown
Contributor

Independent pre-review on Linux (full CI runs only happen on manual trigger, so recording one): CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON.

  • Builds; tools/check_conventions.py --base origin/main passes.
  • Full suite: 832/832 passed (all tests including the Vulkan suites on AMD RX 9070 XT / RADV).

@blawesom

Copy link
Copy Markdown
Contributor

Cross-reference: #3396 implements the same export (sceKernelGetEventError).

CONTRIBUTING.md asks authors to "check that no open pull request already implements the same functions" before starting — both PRs are open, so flagging for the maintainers.

The limitation this creates: only one of the two can be merged; the other gets closed as duplicate, and both currently cost review time in a 340+ queue.

Evidence to help the choice (independent pre-review, Linux — CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON):

@blawesom blawesom mentioned this pull request Oct 11, 2026
9 tasks done
@ZekriDev1

Copy link
Copy Markdown
Author

Superseded by #4046, whose branch contains this exact commit plus the wider coverage batch. Closing to stay within the open-PR limit; please review the equeue change there.

@ZekriDev1 ZekriDev1 closed this Oct 11, 2026
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.

3 participants