Merge change 23892 into eclair

* changes:
  android_atomic_write() implementation was using cmpxchg which was useless
This commit is contained in:
Android (Google) Code Review 2009-09-04 16:32:47 -07:00
commit 4599c1ff56
2 changed files with 4 additions and 22 deletions

View File

@ -55,23 +55,8 @@
*/
android_atomic_write:
stmdb sp!, {r4, lr}
mov r2, r1
mov r1, r0
1: @ android_atomic_write
ldr r0, [r2]
mov r3, #kernel_atomic_base
#ifdef __ARM_HAVE_PC_INTERWORK
add lr, pc, #4
add pc, r3, #(kernel_cmpxchg - kernel_atomic_base)
#else
add r3, r3, #(kernel_cmpxchg - kernel_atomic_base)
mov lr, pc
bx r3
#endif
bcc 1b
ldmia sp!, {r4, lr}
bx lr
str r0, [r1]
bx lr;
/*
* ----------------------------------------------------------------------------

View File

@ -45,11 +45,8 @@
*/
android_atomic_write:
1: ldrex r12, [r1]
strex r12, r0, [r1]
cmp r12, #0
bne 1b
bx lr
str r0, [r1]
bx lr;
/*
* ----------------------------------------------------------------------------