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 17 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
  */
311
  */
312
 #define __shared __asm__ ( "_shared_bss" )
312
 #define __shared __asm__ ( "_shared_bss" )
313
 
313
 
314
+/**
315
+ * Optimisation barrier
316
+ */
317
+#define barrier() __asm__ __volatile__ ( "" : : : "memory" )
318
+
314
 #endif /* ASSEMBLY */
319
 #endif /* ASSEMBLY */
315
 
320
 
316
 #endif /* COMPILER_H */
321
 #endif /* COMPILER_H */

Loading…
Cancel
Save