Skip to content

feat(libkernel): implement sceKernelGetEventError - #4651

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
ErenYeager1836:feat/libkernel-event-error
Oct 12, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
ErenYeager1836:feat/libkernel-event-error

Conversation

@ErenYeager1836

Copy link
Copy Markdown
Contributor

What

Implement sceKernelGetEventError(const KernelEvent* ev) in libkernel:

  • Returns the event's data when EV_ERROR (0x4000) is set in flags, and 0 otherwise, matching KytyPS5 and FreeBSD 11 kevent behavior where the errno of a failed change is returned in data.
  • Rejects null event pointers via requireEvent, throwing like the other event accessors.
  • Extended GuestEqueueEvents.cpp test suite to cover valid EV_ERROR flag extraction, non-error flags returning 0, and null-argument checks.
  • Documented in TechnicalDebt.md.

Carries @screamm's branch rebased on current main.

Tested

  • Windows 11 (x86_64 MinGW GCC 15 / Ninja).
  • Unit tests: guest_equeue_events passed (ctest -R guest_equeue_events -> 100% passed in 0.64 s).
  • Conventions: python tools/check_conventions.py --base upstream/main passed with 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
  • Unblocks: none
  • AI-assisted: yes

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Progress report (7940cac → a0a238c)

📈 System libraries: 87.57% (+0.02%, +1 implemented functions)

✅ 1 implemented
Library Name
libkernel sceKernelGetEventError

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed libkernel docs labels Oct 12, 2026
@ErenYeager1836
ErenYeager1836 force-pushed the feat/libkernel-event-error branch from ddaabc6 to 3f66675 Compare October 12, 2026 18:55
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 12, 2026
barnacasiantiberiu added a commit to barnacasiantiberiu/AnyPS5 that referenced this pull request Oct 12, 2026
Read event data as an error only when EV_ERROR is set, rejecting null
inputs consistently with the existing event accessors.

PC validation: live timer/user queues, all 65536 flag combinations with
five data values, unchanged input and null rejection. The original export
fails guest_equeue_events. Register its bounded module-functional suite.
Document the conflicting console-reference interpretation explicitly.

Adapted from boykopovar/AnyPS5 PR boykopovar#4651 at
3f66675; locally reviewed and extended.
AI-assisted implementation and review. No console validation.

Co-authored-by: David <david@example.com>
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 12, 2026
Return the event's data when EV_ERROR is set in its flags and 0 otherwise, as KytyPS5 does and as FreeBSD 11 kevent stores the errno of a failed change. A null event throws like the other accessors.
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked on the PR rebased onto current main: guest_equeue_events plus the libkernel/libs ctest scope pass (150/150), and the new test fails without the change. The behaviour matches KytyPS5 KernelGetEventError; the fpPS4 divergence and the unverified console behaviour are recorded in the debt entry.

Rebased only to resolve the adjacent conflict in docs/dev/debt/libkernel.md. Merging once CI is green.

@adriadam10
adriadam10 force-pushed the feat/libkernel-event-error branch from 3f66675 to a0a238c Compare October 12, 2026 21:11
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 12, 2026
@adriadam10
adriadam10 merged commit e0fad55 into boykopovar:main Oct 12, 2026
8 checks passed
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.

2 participants