about summary refs log tree commit diff
path: root/nptl/sysdeps/pthread/pthread_cond_wait.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-03-01 08:47:37 +0000
committerUlrich Drepper <drepper@redhat.com>2004-03-01 08:47:37 +0000
commitcff08c81107ae1c8b1581b5e0a534938fd67fc45 (patch)
treeec76e6e96ba1b0f8695796be0a9d8e63bd193052 /nptl/sysdeps/pthread/pthread_cond_wait.c
parentb7fe377cbaef61115deb7dbac1b92eb41e07f380 (diff)
downloadglibc-cff08c81107ae1c8b1581b5e0a534938fd67fc45.tar.gz
glibc-cff08c81107ae1c8b1581b5e0a534938fd67fc45.tar.xz
glibc-cff08c81107ae1c8b1581b5e0a534938fd67fc45.zip
Update.
2004-03-01  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
	(__pthread_cond_timedwait): Optimize wakeup test.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
	(__pthread_cond_wait): Likewise.
	* sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
	* sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
	Likewise.
Diffstat (limited to 'nptl/sysdeps/pthread/pthread_cond_wait.c')
-rw-r--r--nptl/sysdeps/pthread/pthread_cond_wait.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nptl/sysdeps/pthread/pthread_cond_wait.c b/nptl/sysdeps/pthread/pthread_cond_wait.c
index 4435ef81f8..01415bf051 100644
--- a/nptl/sysdeps/pthread/pthread_cond_wait.c
+++ b/nptl/sysdeps/pthread/pthread_cond_wait.c
@@ -143,7 +143,7 @@ __pthread_cond_wait (cond, mutex)
       /* Check whether we are eligible for wakeup.  */
       val = cond->__data.__wakeup_seq;
     }
-  while (! (val > seq && cond->__data.__woken_seq < val));
+  while (val == seq || cond->__data.__woken_seq == val);
 
   /* Another thread woken up.  */
   ++cond->__data.__woken_seq;