about summary refs log tree commit diff
path: root/nptl/sysdeps/pthread
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-02-19 00:55:28 +0000
committerUlrich Drepper <drepper@redhat.com>2004-02-19 00:55:28 +0000
commitdc39124662b25ce2db28454f1749d67550e4de31 (patch)
tree299ee292b80429f09d31b07fa7c9b8dba2ef45ff /nptl/sysdeps/pthread
parent4a08113c4ee0ec9f83ef2ae8a4c5893e80d451f7 (diff)
downloadglibc-dc39124662b25ce2db28454f1749d67550e4de31.tar.gz
glibc-dc39124662b25ce2db28454f1749d67550e4de31.tar.xz
glibc-dc39124662b25ce2db28454f1749d67550e4de31.zip
Update.
2004-02-18  Carlos O'Donell  <carlos@baldric.uwo.ca>

	* test-skeleton.c (main): If set, use environment variable
	TIMEOUTFACTOR to scale test TIMEOUT.
Diffstat (limited to 'nptl/sysdeps/pthread')
-rw-r--r--nptl/sysdeps/pthread/pthread_cond_timedwait.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/nptl/sysdeps/pthread/pthread_cond_timedwait.c b/nptl/sysdeps/pthread/pthread_cond_timedwait.c
index 71e9cf7c8d..80b83107f5 100644
--- a/nptl/sysdeps/pthread/pthread_cond_timedwait.c
+++ b/nptl/sysdeps/pthread/pthread_cond_timedwait.c
@@ -98,9 +98,6 @@ __pthread_cond_timedwait (cond, mutex, abstime)
 
   while (1)
     {
-      /* Prepare to wait.  Release the condvar futex.  */
-      lll_mutex_unlock (cond->__data.__lock);
-
       struct timespec rt;
       {
 #ifdef __NR_clock_gettime
@@ -142,12 +139,10 @@ __pthread_cond_timedwait (cond, mutex, abstime)
 	}
       /* Did we already time out?  */
       if (__builtin_expect (rt.tv_sec < 0, 0))
-	{
-	  /* We are going to look at shared data again, so get the lock.  */
-	  lll_mutex_lock(cond->__data.__lock);
+	goto timeout;
 
-	  goto timeout;
-	}
+      /* Prepare to wait.  Release the condvar futex.  */
+      lll_mutex_unlock (cond->__data.__lock);
 
       /* Enable asynchronous cancellation.  Required by the standard.  */
       cbuffer.oldtype = __pthread_enable_asynccancel ();