History log of /bionic/libc/private/bionic_atomic_arm.h
Revision Date Author Comments
e91f71783bf86cb10ad52f5618ad07d4e7152b2f 03-Jul-2013 Nick Kralevich <nnk@google.com> bionic_atomic_arm.h: Remove < ARMv6 support

This is dead code for most modern Android devices.

Bug: 9674955
Change-Id: Ic63a66b0331a0f07b9183f14a1d5e678c25e4b12
e31bfae2baa96742f998155ee26e56c826a8ce3a 15-Nov-2011 David 'Digit' Turner <digit@android.com> bionic: Do not use <sys/atomics.h> for platform code.

We're going to modify the __atomic_xxx implementation to provide
full memory barriers, to avoid problems for NDK machine code that
link to these functions.

First step is to remove their usage from our platform code.
We now use inlined versions of the same functions for a slight
performance boost.

+ remove obsolete atomics_x86.c (was never compiled)

NOTE: This improvement was benchmarked on various devices.
Comparing a pthread mutex lock + atomic increment + unlock
we get:

- ARMv7 emulator, running on a 2.4 GHz Xeon:
before: 396 ns after: 288 ns

- x86 emulator in KVM mode on same machine:
before: 27 ns after: 27 ns

- Google Nexus S, in ARMv7 mode (single-core):
before: 82 ns after: 76 ns

- Motorola Xoom, in ARMv7 mode (multi-core):
before: 121 ns after: 120 ns

The code has also been rebuilt in ARMv5TE mode for correctness.

Change-Id: Ic1dc72b173d59b2e7af901dd70d6a72fb2f64b17