summaryrefslogtreecommitdiffstats
path: root/src/include/compiler.h
diff options
context:
space:
mode:
authorMichael Brown2007-08-18 19:04:50 +0200
committerMichael Brown2007-08-18 19:04:50 +0200
commita895fd0c15ed6213e6a2ef43e5bf1b1a3c335514 (patch)
tree8c36371f6e2dc91d57c2084ab4a4ee7c74dd53d5 /src/include/compiler.h
parentSeparate out arch-independent parts of stdint.h (diff)
downloadipxe-a895fd0c15ed6213e6a2ef43e5bf1b1a3c335514.tar.gz
ipxe-a895fd0c15ed6213e6a2ef43e5bf1b1a3c335514.tar.xz
ipxe-a895fd0c15ed6213e6a2ef43e5bf1b1a3c335514.zip
Add barrier() primitive (was present in Eb5.4), used by some currently
out-of-tree driver code.
Diffstat (limited to 'src/include/compiler.h')
-rw-r--r--src/include/compiler.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/compiler.h b/src/include/compiler.h
index b130f28f..2151fc6a 100644
--- a/src/include/compiler.h
+++ b/src/include/compiler.h
@@ -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 */