summaryrefslogtreecommitdiffstats
path: root/platforms/atomic_util.h
diff options
context:
space:
mode:
authorlokher <lokher@gmail.com>2023-04-26 16:32:15 +0800
committerlokher <lokher@gmail.com>2023-04-26 16:32:15 +0800
commite4f4ceaf3f2e3d25fb282273a81f9b58790fc427 (patch)
treec0a257eab0ffe5238fdf2c04882e8ee1fe8fc46e /platforms/atomic_util.h
parent103badc87cb50db1ff3851c84331e86ba78fb681 (diff)
merge upstream 713427c
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