aboutsummaryrefslogtreecommitdiff
path: root/platforms/atomic_util.h
diff options
context:
space:
mode:
authorPablo Martínez <[email protected]>2025-05-22 15:31:15 +0200
committerGitHub <[email protected]>2025-05-22 23:31:15 +1000
commit955809bd5aee8b1444595b450eeeef1f42799995 (patch)
tree08da1f696605925286f681a2b738fa5f35cd0386 /platforms/atomic_util.h
parentfa24b0fcce2c5f3330f2d798c3caf91a130babdb (diff)
downloadqmk_firmware-955809bd5aee8b1444595b450eeeef1f42799995.tar.gz
qmk_firmware-955809bd5aee8b1444595b450eeeef1f42799995.zip
Add `compiler_support.h` (#25274)
Diffstat (limited to 'platforms/atomic_util.h')
-rw-r--r--platforms/atomic_util.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/platforms/atomic_util.h b/platforms/atomic_util.h
index 21286d72eb..8e81eacdb8 100644
--- a/platforms/atomic_util.h
+++ b/platforms/atomic_util.h
@@ -15,17 +15,19 @@
*/
#pragma once
+#include "compiler_support.h"
+
// Macro to help make GPIO and other controls atomic.
#ifndef IGNORE_ATOMIC_BLOCK
# if __has_include_next("atomic_util.h")
# include_next "atomic_util.h" /* Include the platforms atomic.h */
# else
-# 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")
+# 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(t) for (uint8_t __ToDo = 1; __ToDo; __ToDo = 0)