OSDN Git Service

Remove remaining bionic support for TARGET_CPU_SMP being false.
authorElliott Hughes <enh@google.com>
Mon, 17 Nov 2014 18:06:20 +0000 (10:06 -0800)
committerElliott Hughes <enh@google.com>
Mon, 17 Nov 2014 18:06:20 +0000 (10:06 -0800)
Change-Id: I02a0a1c0ae55ccb5c45d17fb99a09c374d71def4

libc/Android.mk
libc/private/bionic_atomic_arm.h
libc/private/bionic_atomic_inline.h
libc/private/bionic_atomic_mips.h
libc/private/bionic_atomic_x86.h

index 7d438f4..3e37ca7 100644 (file)
@@ -548,13 +548,6 @@ ifneq ($(BOARD_MALLOC_ALIGNMENT),)
   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 2156e6a..0cb832f 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 b834a27..f8032c3 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 5e08116..83f75fe 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 89639c8..e63df93 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