Browse Source

NPTL/ARCv2: Implement full memory barrier for NPTL

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Vineet Gupta 9 years ago
parent
commit
fef346b266
1 changed files with 5 additions and 2 deletions
  1. 5 2
      libc/sysdeps/linux/arc/bits/atomic.h

+ 5 - 2
libc/sysdeps/linux/arc/bits/atomic.h

@@ -24,8 +24,11 @@ typedef uintmax_t uatomic_max_t;
 
 
 void __arc_link_error (void);
 void __arc_link_error (void);
 
 
-#define atomic_full_barrier() \
+#ifdef __A7__
-     __asm__ __volatile__("": : :"memory")
+#define atomic_full_barrier() __asm__ __volatile__("": : :"memory")
+#else
+#define atomic_full_barrier() __asm__ __volatile__("dmb 3": : :"memory")
+#endif
 
 
 /* Atomic compare and exchange. */
 /* Atomic compare and exchange. */