diff options
author | Joel Challis <[email protected]> | 2023-01-28 21:07:51 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2023-01-28 21:07:51 +0000 |
commit | 8cc2e0e906dd8caadd8198839f57c19deea6c87e (patch) | |
tree | d0d72674a0ab074ff8a774ce66d028a6dbe96f73 /platforms/atomic_util.h | |
parent | 832479c7fbc544a3e8b305af7df9996fa3c5ba00 (diff) | |
download | qmk_firmware-8cc2e0e906dd8caadd8198839f57c19deea6c87e.tar.gz qmk_firmware-8cc2e0e906dd8caadd8198839f57c19deea6c87e.zip |
Fix quantum ring_buffer for ChibiOS (#19683)
Diffstat (limited to 'platforms/atomic_util.h')
-rw-r--r-- | platforms/atomic_util.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/platforms/atomic_util.h b/platforms/atomic_util.h index 2c95302a13..21286d72eb 100644 --- a/platforms/atomic_util.h +++ b/platforms/atomic_util.h @@ -24,9 +24,13 @@ # define ATOMIC_BLOCK _Static_assert(0, "ATOMIC_BLOCK not implemented") # define ATOMIC_BLOCK_RESTORESTATE _Static_assert(0, "ATOMIC_BLOCK_RESTORESTATE not implemented") # define ATOMIC_BLOCK_FORCEON _Static_assert(0, "ATOMIC_BLOCK_FORCEON not implemented") +# define ATOMIC_FORCEON _Static_assert(0, "ATOMIC_FORCEON not implemented") +# define ATOMIC_RESTORESTATE _Static_assert(0, "ATOMIC_RESTORESTATE not implemented") # endif #else /* do nothing atomic macro */ -# define ATOMIC_BLOCK for (uint8_t __ToDo = 1; __ToDo; __ToDo = 0) -# define ATOMIC_BLOCK_RESTORESTATE ATOMIC_BLOCK -# define ATOMIC_BLOCK_FORCEON ATOMIC_BLOCK +# define ATOMIC_BLOCK(t) for (uint8_t __ToDo = 1; __ToDo; __ToDo = 0) +# define ATOMIC_FORCEON +# define ATOMIC_RESTORESTATE +# define ATOMIC_BLOCK_RESTORESTATE ATOMIC_BLOCK(ATOMIC_RESTORESTATE) +# define ATOMIC_BLOCK_FORCEON ATOMIC_BLOCK(ATOMIC_FORCEON) #endif |