diff options
author | QuIC Gerrit Code Review <gerrit@quicinc.com> | 2009-12-23 11:04:16 -0800 |
---|---|---|
committer | QuIC Gerrit Code Review <gerrit@quicinc.com> | 2009-12-23 11:04:16 -0800 |
commit | f1dc03069054f56e1010d538989e38a2d01bc4c6 (patch) | |
tree | df4fa7aac569300fb484c0aa1e42752c7d8aa4eb /libc | |
parent | 5a1d1c7429479ff528812256a7b7eec766823236 (diff) | |
parent | a2f443404fad447514c0f3d8e6b9dcfc811f8edb (diff) | |
download | bionic-f1dc03069054f56e1010d538989e38a2d01bc4c6.zip bionic-f1dc03069054f56e1010d538989e38a2d01bc4c6.tar.gz bionic-f1dc03069054f56e1010d538989e38a2d01bc4c6.tar.bz2 |
Merge change Ia2f44340 into eclair
* changes:
- Combined the old and new implementations of atomic_swap as the old swp instruction is still valid for ARMv5 targets (especially the emulator).
Diffstat (limited to 'libc')
-rw-r--r-- | libc/arch-arm/bionic/atomics_arm.S | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libc/arch-arm/bionic/atomics_arm.S b/libc/arch-arm/bionic/atomics_arm.S index 4890c76..516ce6d 100644 --- a/libc/arch-arm/bionic/atomics_arm.S +++ b/libc/arch-arm/bionic/atomics_arm.S @@ -140,11 +140,15 @@ __atomic_inc: /* r0(new) r1(addr) -> r0(old) */ __atomic_swap: 1: +#if defined(__ARM_ARCH_5__) + swp r0, r0, [r1] +#else /* ARMv6+ */ .word 0xe1912f9f /* ldrex r2, [r1] */ .word 0xe1813f90 /* strex r3, r0, [r1] */ cmp r3, #0 bne 1b mov r0, r2 +#endif bx lr /* __futex_wait(*ftx, val, *timespec) */ |