summaryrefslogtreecommitdiff
path: root/libc/nptl/sysdeps/unix/sysv/linux/i386
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2007-10-18 16:54:40 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2007-10-18 16:54:40 +0000
commit58ddfaf915dfed8eabb3de5ddbfc75400b7a3593 (patch)
tree061fb1227f0e58bd744b795e34227ac07aceb8d4 /libc/nptl/sysdeps/unix/sysv/linux/i386
parent1014a34ffefed553055fbabd75bd1d3c6822763c (diff)
downloadeglibc2-58ddfaf915dfed8eabb3de5ddbfc75400b7a3593.tar.gz
Merge changes between r3831 and r3854 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@3855 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/nptl/sysdeps/unix/sysv/linux/i386')
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S21
1 files changed, 20 insertions, 1 deletions
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S b/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S
index 8f656b4e0..ac045b6e3 100644
--- a/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S
+++ b/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S
@@ -86,7 +86,26 @@ __new_sem_post:
versioned_symbol(libpthread, __new_sem_post, sem_post, GLIBC_2_1)
#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
.global __old_sem_post
-__old_sem_post = __new_sem_post
+ .type __old_sem_post,@function
+__old_sem_post:
+ pushl %ebx
+
+ movl 8(%esp), %ebx
+ LOCK
+ addl $1, (%ebx)
+
+ movl $SYS_futex, %eax
+ movl $FUTEX_WAKE, %ecx
+ movl $1, %edx
+ ENTER_KERNEL
+
+ testl %eax, %eax
+ js 1b
+
+ xorl %eax, %eax
+ popl %ebx
+ ret
+ .size __old_sem_post,.-__old_sem_post
compat_symbol(libpthread, __old_sem_post, sem_post, GLIBC_2_0)
#endif