Commit Graph
7 Commits
Author SHA1 Message Date
Pouare514 c170bba422 fix(libkernel): bound equeue pending events
Undrained triggers queued without limit and AddEvent copied the whole queue, so a flip/vblank flood could exhaust the host heap while guest memory stayed free. Keep the armed event plus at most 64 queued events per registration, dropping the oldest queued event past the cap and keeping the latest payload; an AddEvent carrying more keeps the latest 64. Drained bursts report as before.
2026-10-18 12:15:06 +02:00
David a0a238c86a feat(libkernel): implement sceKernelGetEventError
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.
2026-10-12 23:07:39 +02:00
Hussein Kadhim 59517ef5f5 test(libkernel): cover blocking wait, edge and repeated AMPR equeue events
Document the level-triggered user event semantics of sceKernelWaitEqueue in TechnicalDebt.

(cherry picked from commit db79bee1e5)
2026-10-11 11:28:34 +00:00
Hussein Kadhim a9b7b20f8f fix(libkernel): report a level-triggered equeue event once per wait
A user event added with sceKernelAddUserEvent stays triggered until it is
deleted. The collection loop kept re-emitting it until the caller's event
buffer was full, so a wait with num > 1 returned the same event num times.
Like kevent, each event is now reported at most once per call; distinct
queued completions of one event are still delivered in order.

(cherry picked from commit db28ebbb7f)
2026-10-11 11:28:34 +00:00
Adrià FranchandClaude 9ab637a575 fix(libkernel): wake infinite equeue waits for timers, document timer choices
Co-Authored-By: Claude <[email protected]>
2026-10-07 18:14:04 +02:00
Adrià FranchandClaude d081e6749d feat(libkernel): sceKernelAddTimerEvent and sceKernelDeleteTimerEvent
Co-Authored-By: Claude <[email protected]>
2026-10-07 17:55:57 +02:00
DotDebianandClaude Opus 5.5 40d63b1b4c feat(libkernel): implement the sceKernelGetEvent* field accessors
sceKernelGetEventId, sceKernelGetEventFilter, sceKernelGetEventFflags,
sceKernelGetEventData and sceKernelGetEventUserData return the matching
field of the KernelEvent filled by sceKernelWaitEqueue and throw on a
null event. sceKernelGetEventError still throws NotImplemented.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-02 10:46:15 +02:00