about summary refs log tree commit diff
path: root/nptl/sysdeps/unix/sysv/linux
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-11-18 06:40:25 -0800
committerUlrich Drepper <drepper@redhat.com>2009-11-18 06:40:25 -0800
commitdfedb126d66fa4e9962e80d89233e00b521bf8bb (patch)
treeff47ca9eb1aee1c368306eddff1c5cdc79ab0197 /nptl/sysdeps/unix/sysv/linux
parentdd7106b3c68328f7d4b3794e989e86cb0b0d6461 (diff)
downloadglibc-dfedb126d66fa4e9962e80d89233e00b521bf8bb.tar.gz
glibc-dfedb126d66fa4e9962e80d89233e00b521bf8bb.tar.xz
glibc-dfedb126d66fa4e9962e80d89233e00b521bf8bb.zip
Minor optimizations and cleanups of x86 cond_broadcast.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S19
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S2
2 files changed, 10 insertions, 11 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
index 1a55e522d3..40fb04b31b 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002,2003,2004,2006,2007,2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -138,13 +138,6 @@ __pthread_cond_broadcast:
 
 	cfi_restore_state
 
-	.align	16
-	/* Unlock.  */
-4:	LOCK
-	subl	$1, cond_lock-cond_futex(%ebx)
-	jne	5f
-	jmp	6b
-
 	/* Initial locking failed.  */
 1:
 #if cond_lock == 0
@@ -165,7 +158,13 @@ __pthread_cond_broadcast:
 	call	__lll_lock_wait
 	jmp	2b
 
-	/* Unlock in loop requires waekup.  */
+	.align	16
+	/* Unlock.  */
+4:	LOCK
+	subl	$1, cond_lock-cond_futex(%ebx)
+	je	6b
+
+	/* Unlock in loop requires wakeup.  */
 5:	leal	cond_lock-cond_futex(%ebx), %eax
 #if (LLL_SHARED-LLL_PRIVATE) > 255
 	xorl	%ecx, %ecx
@@ -180,7 +179,7 @@ __pthread_cond_broadcast:
 	call	__lll_unlock_wake
 	jmp	6b
 
-	/* Unlock in loop requires waekup.  */
+	/* Unlock in loop requires wakeup.  */
 7:	leal	cond_lock-cond_futex(%ebx), %eax
 #if (LLL_SHARED-LLL_PRIVATE) > 255
 	xorl	%ecx, %ecx
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
index ad42fb7c75..013fcc303f 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002,2003,2004,2005,2007,2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.