fix(kernel): let a pending HRTIMER wake a blocking equeue wait #1081
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1081"
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 Woesch-Nich on 2026-10-07T09:49:28Z.
Problem
SceKernelWaitEqueuewithmicros == 0(infinite wait) parked forever inm_cond.Wait()even when a one-shot high-resolution timer was pending: the pending expiry was only consulted in the timed branch. A blocking consumer on its timer queue (observed in a real game's dispatcher thread) never woke when its own timer fired.Fix
Mirror the timed branch: if
NextTimerWaitMicros()reports a pending expiry, wait until that deadline instead of blocking indefinitely; fall back toWait()when no timer is pending (no behavior change in that case).Testing
Verified in-conversation on a Windows host running the game under the AnyPS5 relinker: the dispatcher thread that previously parked for the whole session now wakes on its HRTIMER expiry; the full thread roster comes up.
Related: #807 (adriadam10) touches the producer side (
sceKernelAddTimerEvent/DeleteTimerEvent); this is the consumer-side half.Attribution: this fix was entirely written by Qwen 3.8 27b (in-conversation coding agent) and supervised by Claude.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-08T02:44:07Z.
Closing: main already does this since #807, which makes the infinite wait in
Equeue.cppwake at the pending timer's deadline. If a title still parks there on current main, please comment here with the title ID and the log line where it stops.Pull request closed