]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Mon, 1 Mar 2004 08:47:37 +0000 (08:47 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 1 Mar 2004 08:47:37 +0000 (08:47 +0000)
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.

nptl/ChangeLog
nptl/DESIGN-condvar.txt
nptl/sysdeps/pthread/pthread_cond_timedwait.c
nptl/sysdeps/pthread/pthread_cond_wait.c
nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S

index 1b153bc53c64122b86bd5080c30e625d89d62477..146c5c36c006eb00960189607fe3ce044b7d5f38 100644 (file)
@@ -1,3 +1,13 @@
+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.
+
 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
 
        * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
index 4a8212bae1d688d3058959a72618bc9261596c06..cb0f59c823b260841c9b2bce514ec1f5521d6488 100644 (file)
@@ -65,7 +65,7 @@ cond_timedwait(cv, mutex, timeout):
 
      val = cv->wakeup_seq;
 
-     if (val > seq && cv->woken_seq < val) {
+     if (val != seq && cv->woken_seq != val) {
        ret = 0;
        break;
      }
index 80b83107f5449ebd21f629fa9d5b99c23ca3b5ef..a03f51e0f0669f696ae5005cee27278a0772ae78 100644 (file)
@@ -159,7 +159,7 @@ __pthread_cond_timedwait (cond, mutex, abstime)
 
       /* Check whether we are eligible for wakeup.  */
       val = cond->__data.__wakeup_seq;
-      if (val > seq && cond->__data.__woken_seq < val)
+      if (val != seq && cond->__data.__woken_seq != val)
        break;
 
       /* Not woken yet.  Maybe the time expired?  */
index 4435ef81f88663224ff1370e07ae60b263da7895..01415bf0516a03e30d47cdaffd5f625e56bd7eac 100644 (file)
@@ -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;
index 8e6e4bfdf52750efb3b8d2fd4dc7b06191c9eed0..b1c32ea4b1834e5bcbb9f4c5075d945a3470d8c2 100644 (file)
@@ -190,16 +190,14 @@ __pthread_cond_timedwait:
        movl    wakeup_seq+4(%ebx), %edx
 
        cmpl    16(%esp), %edx
-       ja      7f
-       jb      15f
+       jne     7f
        cmpl    12(%esp), %edi
-       jbe     15f
+       j     15f
 
 7:     cmpl    %ecx, %edx
-       ja      9f
-       jb      15f
+       jne     9f
        cmp     %eax, %edi
-       j     9f
+       jne     9f
 
 15:    cmpl    $-ETIMEDOUT, %esi
        jne     8b
index b38fd6bf3b4cccd4338c9836091cf7904ee0e83a..38cb36ae913a7abe4576fd216d054bb7c9e08893 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -133,16 +133,14 @@ __pthread_cond_wait:
        movl    wakeup_seq+4(%ebx), %edx
 
        cmpl    8(%esp), %edx
-       ja      7f
-       jb      8b
+       jne     7f
        cmpl    4(%esp), %edi
-       jbe     8b
+       j     8b
 
 7:     cmpl    %ecx, %edx
-       ja      9f
-       jb      8b
+       jne     9f
        cmp     %eax, %edi
-       jna     8b
+       j     8b
 
 9:     addl    $1, woken_seq(%ebx)
        adcl    $0, woken_seq+4(%ebx)