From a895fd0c15ed6213e6a2ef43e5bf1b1a3c335514 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sat, 18 Aug 2007 18:04:50 +0100 Subject: [PATCH] Add barrier() primitive (was present in Eb5.4), used by some currently out-of-tree driver code. --- src/include/compiler.h | 5 +++++ 1 file changed, 5 insertions(+) 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 */