do { (void)(&(var) == (type *)0); } while(0)
#endif
+/**
+ * Prevent the compiler from optimizing access to the variable \a x, enforcing
+ * a refetch from memory. This also forbid from reordering successing instances
+ * of ACCESS_SAFE().
+ */
+#define ACCESS_SAFE(x) (*(volatile typeof(x) *)&(x))
+
#endif /* BERTOS_COMPILER_H */
#endif
-/**
- * Prevent the compiler from optimizing access to the variable \a x, enforcing
- * a refetch from memory. This also forbid from reordering successing instances
- * of ACCESS_SAFE().
- *
- * TODO: move this to cfg/compiler.h
- */
-#define ACCESS_SAFE(x) (*(volatile typeof(x) *)&(x))
-
#if defined(CONFIG_KERN_SIGNALS) && CONFIG_KERN_SIGNALS
/** Initialize the generic sleepable event \a e */
#define event_initGeneric(e) \