Skip to content

impact: command words skip the HQ4 state lock - #355

Merged
techomancer merged 1 commit into
mainfrom
locklesscmd
Oct 29, 2026
Merged

techomancer merged 1 commit into
mainfrom
locklesscmd

Conversation

@techomancer

Copy link
Copy Markdown
Owner

Every 0x120400 command word took the HQ4 state mutex only to decide the port's phase, which after the first context switch is always the command phase. An atomic flag now mirrors that phase (a switch has completed and no selection has started another), set and cleared under the lock at the three places it changes: reset, the context-switch selection and the 63rd image word. A command word checks it and goes straight to the FIFO; the image, the pre-switch packets and stray words keep the locked path.

Every 0x120400 command word took the HQ4 state mutex only to decide the
port's phase, which after the first context switch is always the
command phase. An atomic flag now mirrors that phase (a switch has
completed and no selection has started another), set and cleared under
the lock at the three places it changes: reset, the context-switch
selection and the 63rd image word. A command word checks it and goes
straight to the FIFO; the image, the pre-switch packets and stray words
keep the locked path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@techomancer
techomancer merged commit b188bb9 into main Oct 29, 2026
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant