Skip to content

fix(libkernel): sceKernelGetEventError - #3396

Closed
fidalgojoao wants to merge 3 commits into
boykopovar:mainfrom
fidalgojoao:libkernel-geteventerror
Closed

fidalgojoao wants to merge 3 commits into
boykopovar:mainfrom
fidalgojoao:libkernel-geteventerror

Conversation

@fidalgojoao

@fidalgojoao fidalgojoao commented Oct 11, 2026 •

Copy link
Copy Markdown

What

Implements sceKernelGetEventError in libkernel, replacing the NotImplemented_nid_no_patch stub. It returns the event's data field as the error number when EV_ERROR is set in the event's flags (the kqueue convention) and 0 otherwise. A null event throws, like the other event accessors in the same file.

Extends GuestEqueueEvents.cpp to cover the no-error case, the EV_ERROR case and null rejection.

Not verified on PS5 hardware: I assumed the function returns the raw error number from data, not an 0x8002xxxx SCE error code. Please correct this if it is wrong.

Tested

Windows 11, MinGW-w64 GCC 15.2.0, full build plus libs target. ctest: 573 tests, 0 failed, 3 skipped (video_out_flip_lifetime, video_out_flip_controls, guest_video_out_wqhd_detection_no_vulkan). The skipped tests also skip on an unmodified main on my machine. No title or homebrew tested.

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

@github-actions

Copy link
Copy Markdown

Progress report (946ffa0 → 8c354e7)

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

✅ 1 implemented
Library Name
libkernel sceKernelGetEventError

@adriadam10

Copy link
Copy Markdown
Collaborator

Ready to merge from my side, but the PR description fails the conventions check:

  • [pr-template] Fill in the pull request template: unchecked: Based on current main; no other open PR implements the same functions
  • [pr-template] Fill in the pull request template: unchecked: One topic per PR; follow-ups go in a new PR
  • [pr-template] Fill in the pull request template: unchecked: No comments in code except technical debt
  • [pr-template] Fill in the pull request template: unchecked: Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • [pr-template] Fill in the pull request template: unchecked: No notes, investigation .md files or images added to the repository (attach them to this PR)
  • [pr-template] Fill in the pull request template: unchecked: New third-party code is a submodule built from source
  • [pr-template] Fill in the pull request template: unchecked: Generic behaviour, not specific to one title
  • [pr-template] Fill in the pull request template: unchecked: Depends on: none

Please fill those template lines in (only you can answer AI-assisted); it merges once they pass.

@fidalgojoao

Copy link
Copy Markdown
Author

Hello @adriadam10 ! Done now, sorry for this mistake

@blawesom

Copy link
Copy Markdown
Contributor

Cross-reference: #3638 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.

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

  • feat(libkernel): implement sceKernelGetEventError #3638: based on current main, CLEAN, full local suite 832/832 green;
  • this branch: 223 commits behind main, currently DIRTY — and CONTRIBUTING.md also asks authors to "keep the branch up to date with main and resolve conflicts yourself", so a rebase would be needed regardless.

If it helps, rebasing onto #3638 (or closing one of them) would clear it; the choice is the maintainers'.

@adriadam10

Copy link
Copy Markdown
Collaborator

Closing as a duplicate: #3638 implements the same export with the same behaviour ((int)data when EV_ERROR is set, else 0; null event throws like the sibling accessors), is based on current main, and has an independent Linux full-suite run. This branch conflicts with main (it predates the sceKernelGetEvent* accessors commit touching the same file), so only one of the two can land and #3638 is the one ready to merge.

Thanks for the contribution. If #3638 doesn't land, feel free to reopen rebased on main. In that case, please also check CONTRIBUTING's "no open PR implements the same functions" box against the open PR list before starting.

@adriadam10 adriadam10 closed this Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libkernel needs rebase Conflicts with main, rebase needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants