Add barrier() primitive (was present in Eb5.4), used by some currently
[people/xl0/gpxe.git] / src / include / compiler.h
index b130f28..2151fc6 100644 (file)
@@ -311,6 +311,11 @@ extern void dbg_hex_dump_da ( unsigned long dispaddr,
  */
 #define __shared __asm__ ( "_shared_bss" )
 
+/**
+ * Optimisation barrier
+ */
+#define barrier() __asm__ __volatile__ ( "" : : : "memory" )
+
 #endif /* ASSEMBLY */
 
 #endif /* COMPILER_H */