summaryrefslogtreecommitdiffstats
path: root/libc/arch-x86/bionic/atomics_x86.S
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2010-03-18 17:13:41 -0700
committerDavid 'Digit' Turner <digit@google.com>2010-03-18 17:13:41 -0700
commit88f06cd84a70f8a5212cb03272ec2c7cf0017afa (patch)
tree4ff0a88177cd5fb2ca9c0e6df9a331cea7ecad1c /libc/arch-x86/bionic/atomics_x86.S
parentee7b077abf1d99503b986489ad93374a057cb354 (diff)
downloadbionic-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-x86/bionic/atomics_x86.S')
-rw-r--r--libc/arch-x86/bionic/atomics_x86.S32
1 files changed, 32 insertions, 0 deletions
diff --git a/libc/arch-x86/bionic/atomics_x86.S b/libc/arch-x86/bionic/atomics_x86.S
index 2370f23..666e182 100644
--- a/libc/arch-x86/bionic/atomics_x86.S
+++ b/libc/arch-x86/bionic/atomics_x86.S
@@ -41,6 +41,38 @@ __futex_wake:
popl %ebx
ret
+/* int __futex_syscall3(volatile void *ftx, int op, int count) */
+.text
+.globl __futex_syscall3
+.type __futex_syscall3, @function
+.align 4
+__futex_syscall3:
+ pushl %ebx
+ movl 8(%esp), %ebx /* ftx */
+ movl 12(%esp), %ecx /* op */
+ movl 16(%esp), %edx /* value */
+ movl $__NR_futex, %eax
+ int $0x80
+ popl %ebx
+ ret
+
+/* int __futex_syscall4(volatile void *ftx, int op, int val, const struct timespec *timeout) */
+.text
+.globl __futex_syscall4
+.type __futex_syscall4, @function
+.align 4
+__futex_syscall4:
+ pushl %ebx
+ pushl %esi
+ movl 12(%esp), %ebx /* ftx */
+ movl 16(%esp), %ecx /* op */
+ movl 20(%esp), %edx /* val */
+ movl 24(%esp), %esi /* timeout */
+ movl $__NR_futex, %eax
+ int $0x80
+ popl %esi
+ popl %ebx
+ ret
/* int __atomic_cmpxchg(int old, int new, volatile int* addr) */