kernel: export sceKernelDeleteTimerEvent (Gran Turismo 7) #2107
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!2107
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2107/head"
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?
@NevesHenry on GitHub · 2026-11-04 14:09 UTC · original
NevesHenry:kernel/delete-timer-event→main· +12 −4 · 4 files · 1 commits · merged 2026-11-04 21:57 UTCGame: Gran Turismo 7 1.000 (PPSA01316), #1930
Problem
sceKernelDeleteTimerEvent(YWQFUyXIVdU) is not exported, whilesceKernelAddTimerEventandsceKernelDeleteHRTimerEventare. Calls go to the unresolved import stub, which returns 0 and leaves the timer in the queue, so a periodic timer keeps firing after the game deleted it.Evidence (log attached to #1930)
57ZK+ODEXWY(AddTimerEvent) andYWQFUyXIVdU(DeleteTimerEvent).YWQFUyXIVdUstub call: per second the counts are equal until the 1024-call stub log cap (~13 s in).Change
KernelDeleteTimerEventdeletes the EVFILT_TIMER event throughKernelDeleteEvent, the wayKernelDeleteHRTimerEventdoes for EVFILT_HRTIMER (EBADF for a bad queue, ENOENT for an unknown timer), and is registered next tosceKernelAddTimerEvent.Testing
event_queue_lifetime_tests: the periodic timer test now deletes through the export and checks that a deleted zero-interval timer is not delivered again. It passes with the change. With the function reduced toreturn OK;(what the stub does), it fails at "deleted timer is not delivered again".kyty_emulator; clang-format 22.1.3 leaves the change as is.AI use: written with Claude Code (it scanned the issue logs, found the missing export and drafted the change and test). I reviewed the code and checked the NID and the before/after test.
🤖 Generated with Claude Code
@coderabbitai[bot] on GitHub · 2026-11-04 14:17 UTC · original
No actionable comments were generated in the recent review.
Walkthrough
The event queue API adds
KernelDeleteTimerEventand registers it as a libKernel export. The function forwards the queue and ID toKernelDeleteEventwith the timer event filter. Timer lifetime tests use the new function and check that a wait after deletion times out and that deleting the timer again returnsKERNEL_ERROR_ENOENT.Suggested reviewers:
nmzikChange: Bug fix
Merge Risk:
Minimal · up to
772f9The timer deletion API is correctly wired, exported, and covered by lifetime checks.
Pre-merge checks:
4 ·
1
Full details: Title check
Explanation
The title names the main change: exporting sceKernelDeleteTimerEvent (the function registered under NID YWQFUyXIVdU in libKernel.cpp and implemented as KernelDeleteTimerEvent in eventQueue.cpp/.h). The game reference is context for the motivation. The changeset matches the title, so the check passes.
Full details: Description check
Explanation
The description states the problem (sceKernelDeleteTimerEvent is not exported, so calls hit an unresolved stub), the evidence from the issue log, the change (KernelDeleteTimerEvent forwarding to KernelDeleteEvent and registration beside sceKernelAddTimerEvent), and the testing done. This matches the changeset, so the check passes.
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 4 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
02613d1b-7cd2-4f31-a324-500be3ce3593Reviewing files that changed from the base of the PR and between
91c5820c0cand772f948173.src/kernel/eventQueue.cppsrc/kernel/eventQueue.hsrc/libs/libKernel.cpptests/EventQueueLifetimeTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
@md-archive on GitHub · 2026-11-04 20:35 UTC · original
Tested
772f948on GT7 1.000 (PPSA01316), Linux, local build.Before (dcc_fix- 82d9036d): only 57ZK+ODEXWY (AddTimerEvent) is relocated; YWQFUyXIVdU isn’t.
After: YWQFUyXIVdU now relocates to EventQueue::KernelDeleteTimerEvent.
Slow logo and loading hang are unchanged.
My logging doesn’t record individual EVFILT_TIMER/GRAPHICS events, so I can’t confirm the event rate. Happy to rerun with the setting you need. Both logs attached.
logs_kyty.tar.gz
ppsa01316_82d9036d.tar.gz