-
-
Notifications
You must be signed in to change notification settings - Fork 39.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split - Avoid race condition during matrix_init_quantum #8235
Merged
Conversation
This file contains 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
tzarc
approved these changes
Feb 25, 2020
nooges
reviewed
Feb 25, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good other than typo
nooges
approved these changes
Feb 25, 2020
nesth
pushed a commit
to nesth/qmk_firmware
that referenced
this pull request
Feb 27, 2020
* upstream/master: (26 commits) Fixed OS detection such that OSX doesn't take over the world (qmk#8248) [Keyboard] Add Prime_EXL Plus to handwired (qmk#8238) format code according to conventions [skip ci] New feature: PERMISSIVE_HOLD_PER_KEY (qmk#7994) Split - Avoid race condition during matrix_init_quantum (qmk#8235) Acheron VIA support (qmk#8204) `send_unicode_string()`: Add support for code points > 0xFFFF (qmk#8236) [Keyboard] Add Wete (qmk#8229) Improvements to extrakey HID descriptors (qmk#8156) Hineybush h87a lock indicators (qmk#8237) Add VIA support for Prime_L (qmk#8233) Hub16 - Bug removal + clean up code (qmk#8227) [Keyboard] ai03 Equinox (qmk#8224) [Keyboard] Add zfrontier/big_switch (qmk#8205) Gingham Update (qmk#8225) A proper `send_string()` for the Unicode feature (qmk#8155) Rollback PR qmk#7967 in preference of fixing I2C start/stop properly, in a followup PR. (qmk#8173) Add mouse support to SEND_STRING (qmk#8223) Add link to "Useful functions" in macro docs (qmk#7446) New functionality for cformat (qmk#7893) ...
HokieGeek
pushed a commit
to HokieGeek/qmk_firmware
that referenced
this pull request
Mar 5, 2020
* Avoid race condition during matrix_init_quantum * spelling is hard
c0psrul3
pushed a commit
to c0psrul3/qmk_firmware
that referenced
this pull request
Mar 23, 2020
* Avoid race condition during matrix_init_quantum * spelling is hard
drashna
pushed a commit
to zsa/qmk_firmware
that referenced
this pull request
Mar 26, 2020
* Avoid race condition during matrix_init_quantum * spelling is hard
sowbug
pushed a commit
to sowbug/qmk_firmware
that referenced
this pull request
Apr 2, 2020
* Avoid race condition during matrix_init_quantum * spelling is hard
3 tasks
kylekuj
pushed a commit
to kylekuj/qmk_firmware
that referenced
this pull request
Apr 21, 2020
* Avoid race condition during matrix_init_quantum * spelling is hard
13 tasks
jakeisnt
pushed a commit
to jakeisnt/qmk_firmware
that referenced
this pull request
Aug 20, 2020
* Avoid race condition during matrix_init_quantum * spelling is hard
Closed
BorisTestov
pushed a commit
to BorisTestov/qmk_firmware
that referenced
this pull request
May 23, 2024
* Avoid race condition during matrix_init_quantum * spelling is hard
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.
Description
Made much worse by the
SPLIT_USB_DETECT
mode, there is a window where the slave side has is interrupt handler registered before its init process has finished. Given this interrupt can jump in at any point, it breaks some single threaded assumptions within the codebase.Order of events:
post_init
which triggers RGB syncWhat you expect is that both halves share the same RGB config, however what actually happens is the slave side has the eeprom values set till the next animation tick (30 seconds).
While difficult, i have managed to reproduce this without the
SPLIT_USB_DETECT
mode.With this change, interrupt handlers are registered after init. Any rgb syncs will then fail, and be retried till the slave starts to respond (after its init process has completed).
Types of Changes
Checklist