about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-10-17 14:34:44 +0000
committerJakub Jelinek <jakub@redhat.com>2007-10-17 14:34:44 +0000
commit96c06e084be93757bde5cc231a8ae1b616c27bf0 (patch)
tree0bd8ae44abf791949e4031d7b21711e8c65a8189
parent6a649d25bb4eac00000781221310b7c9e547b503 (diff)
downloadglibc-96c06e084be93757bde5cc231a8ae1b616c27bf0.tar.gz
glibc-96c06e084be93757bde5cc231a8ae1b616c27bf0.tar.xz
glibc-96c06e084be93757bde5cc231a8ae1b616c27bf0.zip
* sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
routine instead of an alias to __new_sem_post.
2007-10-17  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
	routine instead of an alias to __new_sem_post.
-rw-r--r--nptl/ChangeLog5
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S21
2 files changed, 25 insertions, 1 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 85edbbe11d..eb9dd20b5a 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,8 @@
+2007-10-17  Jakub Jelinek  <jakub@redhat.com>
+
+	* sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
+	routine instead of an alias to __new_sem_post.
+
 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
 
 	* init.c (__pthread_initialize_minimal): Initialize word to appease
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S
index 8f656b4e0f..ac045b6e34 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S
+++ b/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