summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eef1eb6)
raw | patch | inline | side by side (parent: eef1eb6)
author | Elliott Hughes <enh@google.com> | |
Mon, 17 Nov 2014 18:06:20 +0000 (10:06 -0800) | ||
committer | Elliott Hughes <enh@google.com> | |
Mon, 17 Nov 2014 18:06:20 +0000 (10:06 -0800) |
Change-Id: I02a0a1c0ae55ccb5c45d17fb99a09c374d71def4
diff --git a/libc/Android.mk b/libc/Android.mk
index 7d438f48b11ff8657d68eda2a5bacf2b3dae3bbb..3e37ca7ec3464b47d5ca3919e5c2fbe1e4a5c854 100644 (file)
--- a/libc/Android.mk
+++ b/libc/Android.mk
libc_common_cflags += -DMALLOC_ALIGNMENT=$(BOARD_MALLOC_ALIGNMENT)
endif
-# Define ANDROID_SMP appropriately.
-ifeq ($(TARGET_CPU_SMP),true)
- libc_common_cflags += -DANDROID_SMP=1
-else
- libc_common_cflags += -DANDROID_SMP=0
-endif
-
# Define some common conlyflags
libc_common_conlyflags := \
-std=gnu99
index 2156e6a99f1df6f883e2d567b288d9b688a6f93a..0cb832f9757ca4621f5cf31d8a61ade505b892e0 100644 (file)
#define BIONIC_ATOMIC_ARM_H
__ATOMIC_INLINE__ void __bionic_memory_barrier() {
-#if defined(ANDROID_SMP) && ANDROID_SMP == 1
__asm__ __volatile__ ( "dmb ish" : : : "memory" );
-#else
- /* A simple compiler barrier. */
- __asm__ __volatile__ ( "" : : : "memory" );
-#endif
}
/* Compare-and-swap, without any explicit barriers. Note that this function
index b834a2779ab47436e5d310f9e6c049353c4dba0f..f8032c34a65e931020da91d6aaaf4fba3ede735a 100644 (file)
* on SMP systems emits an appropriate instruction.
*/
-#if !defined(ANDROID_SMP)
-# error "Must define ANDROID_SMP before including atomic-inline.h"
-#endif
-
#ifdef __cplusplus
extern "C" {
#endif
index 5e081161d3bc5eac3fb71d2f7a906985f54e0dc0..83f75fe86b9759b351876a99de9a45a3bd4e3364 100644 (file)
*/
__ATOMIC_INLINE__ void __bionic_memory_barrier() {
-#if defined(ANDROID_SMP) && ANDROID_SMP == 1
__asm__ __volatile__ ( "sync" : : : "memory" );
-#else
- /* A simple compiler barrier. */
- __asm__ __volatile__ ( "" : : : "memory" );
-#endif
}
/* Compare-and-swap, without any explicit barriers. Note that this function
index 89639c8b2982787c267e006b9c005646c9329bdd..e63df93848d9297183712cd6969fa0b5aadfc190 100644 (file)
* platform for a multi-core device.
*/
__ATOMIC_INLINE__ void __bionic_memory_barrier() {
-#if defined(ANDROID_SMP) && ANDROID_SMP == 1
__asm__ __volatile__ ( "mfence" : : : "memory" );
-#else
- /* A simple compiler barrier. */
- __asm__ __volatile__ ( "" : : : "memory" );
-#endif
}
/* Compare-and-swap, without any explicit barriers. Note that this function