fix(libkernel): sceKernelGetEventError #3396
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3396"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by fidalgojoao on 2026-10-11T09:41:08Z.
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
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T09:52:03Z.
Progress report (
946ffa0→8c354e7)📈 System libraries: 85.47% (+0.03%, +1 implemented functions)
✅ 1 implemented
sceKernelGetEventErrorImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T09:56:48Z.
Ready to merge from my side, but the PR description fails the conventions check:
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Please fill those template lines in (only you can answer AI-assisted); it merges once they pass.
Imported from boykopovar/AnyPS5. Originally posted by fidalgojoao on 2026-10-11T14:39:11Z.
Hello @adriadam10 ! Done now, sorry for this mistake
Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-11T17:19:10Z.
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):main, CLEAN, full local suite 832/832 green;main, currently DIRTY — and CONTRIBUTING.md also asks authors to "keep the branch up to date withmainand 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'.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T20:53:12Z.
Closing as a duplicate: #3638 implements the same export with the same behaviour (
(int)datawhenEV_ERRORis set, else 0; null event throws like the sibling accessors), is based on currentmain, and has an independent Linux full-suite run. This branch conflicts withmain(it predates thesceKernelGetEvent*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.Pull request closed