summaryrefslogtreecommitdiffstats
path: root/platforms/atomic_util.h
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2023-02-28 11:22:29 +1100
committerNick Brassel <nick@tzarc.org>2023-02-28 11:22:29 +1100
commitbacec14073b2e897d5a52caf12de5a6a1f7b4078 (patch)
treed4e3e57aac1a829a191831efd2e62c8a43217885 /platforms/atomic_util.h
parentd70e9b8659a7fbbd7069fd542bd07e67e04327a1 (diff)
parentb865b9e1706ad28ae4882bd2e0331e98808295fa (diff)
Merge remote-tracking branch 'upstream/develop'
Diffstat (limited to 'platforms/atomic_util.h')
-rw-r--r--platforms/atomic_util.h10
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