diff options
author | David 'Digit' Turner <digit@google.com> | 2010-03-18 17:13:41 -0700 |
---|---|---|
committer | David 'Digit' Turner <digit@google.com> | 2010-03-18 17:13:41 -0700 |
commit | 88f06cd84a70f8a5212cb03272ec2c7cf0017afa (patch) | |
tree | 4ff0a88177cd5fb2ca9c0e6df9a331cea7ecad1c /libc/arch-arm | |
parent | ee7b077abf1d99503b986489ad93374a057cb354 (diff) | |
download | bionic-88f06cd84a70f8a5212cb03272ec2c7cf0017afa.zip bionic-88f06cd84a70f8a5212cb03272ec2c7cf0017afa.tar.gz bionic-88f06cd84a70f8a5212cb03272ec2c7cf0017afa.tar.bz2 |
Use private futexes for pthread_mutex_t.
This does not change the implementation of conditional variables
since we're waiting for other system components to properly use
pthread_condattr_init/setpshared before that.
Also remove an obsolete x86 source file.
Change-Id: Ia3e3fbac35b87a534fb04d4381c3c66b975bc8f7
Diffstat (limited to 'libc/arch-arm')
-rw-r--r-- | libc/arch-arm/bionic/atomics_arm.S | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/libc/arch-arm/bionic/atomics_arm.S b/libc/arch-arm/bionic/atomics_arm.S index 55c642f..047541f 100644 --- a/libc/arch-arm/bionic/atomics_arm.S +++ b/libc/arch-arm/bionic/atomics_arm.S @@ -35,10 +35,6 @@ .type __atomic_dec, %function .global __atomic_inc .type __atomic_inc, %function -.global __futex_wait -.type __futex_wait, %function -.global __futex_wake -.type __futex_wake, %function #define FUTEX_WAIT 0 #define FUTEX_WAKE 1 @@ -159,10 +155,34 @@ __atomic_swap: bx lr /* __futex_wait(*ftx, val, *timespec) */ -/* __futex_syscall(*ftx, op, val, *timespec, *addr2, val3) */ +/* __futex_wake(*ftx, counter) */ +/* __futex_syscall3(*ftx, op, val) */ +/* __futex_syscall4(*ftx, op, val, *timespec) */ + +.global __futex_wait +.type __futex_wait, %function + +.global __futex_wake +.type __futex_wake, %function + +.global __futex_syscall3 +.type __futex_syscall3, %function + +.global __futex_syscall4 +.type __futex_syscall4, %function #if __ARM_EABI__ +__futex_syscall3: + .fnstart + stmdb sp!, {r4, r7} + .save {r4, r7} + ldr r7, =__NR_futex + swi #0 + ldmia sp!, {r4, r7} + bx lr + .fnend + __futex_wait: .fnstart stmdb sp!, {r4, r7} @@ -187,6 +207,10 @@ __futex_wake: #else +__futex_syscall3: + swi #__NR_futex + bx lr + __futex_wait: mov r3, r2 mov r2, r1 @@ -201,3 +225,6 @@ __futex_wake: bx lr #endif + +__futex_syscall4: + b __futex_syscall3 |