Browse Source

Add barrier() primitive (was present in Eb5.4), used by some currently

out-of-tree driver code.
tags/v0.9.3
Michael Brown 16 years ago
parent
commit
800c8b014b
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      src/include/compiler.h

+ 5
- 0
src/include/compiler.h View File

@@ -311,6 +311,11 @@ extern void dbg_hex_dump_da ( unsigned long dispaddr,
311 311
  */
312 312
 #define __shared __asm__ ( "_shared_bss" )
313 313
 
314
+/**
315
+ * Optimisation barrier
316
+ */
317
+#define barrier() __asm__ __volatile__ ( "" : : : "memory" )
318
+
314 319
 #endif /* ASSEMBLY */
315 320
 
316 321
 #endif /* COMPILER_H */

Loading…
Cancel
Save