about summary refs log tree commit diff
path: root/nptl/pthread_cond_wait.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/pthread_cond_wait.c')
-rw-r--r--nptl/pthread_cond_wait.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nptl/pthread_cond_wait.c b/nptl/pthread_cond_wait.c
index 685dbca32f..02d11c61db 100644
--- a/nptl/pthread_cond_wait.c
+++ b/nptl/pthread_cond_wait.c
@@ -506,7 +506,7 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex,
 
 	  __pthread_cleanup_pop (&buffer, 0);
 
-	  if (__glibc_unlikely (err == ETIMEDOUT))
+	  if (__glibc_unlikely (err == ETIMEDOUT || err == EOVERFLOW))
 	    {
 	      __condvar_dec_grefs (cond, g, private);
 	      /* If we timed out, we effectively cancel waiting.  Note that
@@ -515,7 +515,7 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex,
 		 __condvar_quiesce_and_switch_g1 and us trying to acquire
 		 the lock during cancellation is not possible.  */
 	      __condvar_cancel_waiting (cond, seq, g, private);
-	      result = ETIMEDOUT;
+	      result = err;
 	      goto done;
 	    }
 	  else