index 3957d465acaecf6ba69c2d3f5eeb68323b6ca651..0cb832f9757ca4621f5cf31d8a61ade505b892e0 100644 (file)
#ifndef BIONIC_ATOMIC_ARM_H
#define BIONIC_ATOMIC_ARM_H
-__ATOMIC_INLINE__ void __bionic_memory_barrier(void) {
-#if defined(ANDROID_SMP) && ANDROID_SMP == 1
- __asm__ __volatile__ ( "dmb" : : : "memory" );
-#else
- /* A simple compiler barrier. */
- __asm__ __volatile__ ( "" : : : "memory" );
-#endif
+__ATOMIC_INLINE__ void __bionic_memory_barrier() {
+ __asm__ __volatile__ ( "dmb ish" : : : "memory" );
}
-/* Compare-and-swap, without any explicit barriers. Note that this functions
+/* Compare-and-swap, without any explicit barriers. Note that this function
* returns 0 on success, and 1 on failure. The opposite convention is typically
* used on other platforms.
*/