aboutsummaryrefslogtreecommitdiff
path: root/platforms/atomic_util.h
diff options
context:
space:
mode:
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)