Repository navigation
fix(kernel): let a pending HRTIMER wake a blocking equeue wait - #1081
Closed
Woesch-Nich wants to merge 1 commit into
Closed
Woesch-Nich wants to merge 1 commit into
Woesch-Nich wants to merge 1 commit into
Conversation
SceKernelWaitEqueue with micros == 0 (infinite) parked forever in m_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 (e.g. a game's timer/dispatcher queue) never woke when its own timer fired. Mirror the timed branch: if NextTimerWaitMicros() reports a pending expiry, wait until that deadline instead of blocking indefinitely. Note: the fix was entirely written by Qwen 3.8 27b (in-conversation agent) and supervised by Claude. Related: boykopovar#807 touches sceKernelAddTimerEvent/DeleteTimerEvent; this change is the consumer-side half of that timer path.
9 tasks done
9 tasks done
Collaborator
|
Closing: main already does this since #807, which makes the infinite wait in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.