about summary refs log tree commit diff
path: root/nptl/sysdeps/pthread
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps/pthread')
-rw-r--r--nptl/sysdeps/pthread/pthread_cond_timedwait.c2
-rw-r--r--nptl/sysdeps/pthread/pthread_cond_wait.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/nptl/sysdeps/pthread/pthread_cond_timedwait.c b/nptl/sysdeps/pthread/pthread_cond_timedwait.c
index 80b83107f5..a03f51e0f0 100644
--- a/nptl/sysdeps/pthread/pthread_cond_timedwait.c
+++ b/nptl/sysdeps/pthread/pthread_cond_timedwait.c
@@ -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?  */
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;