about summary refs log tree commit diff
path: root/nptl/sysdeps/pthread/pthread_cond_timedwait.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-03-11 09:30:37 +0000
committerRoland McGrath <roland@gnu.org>2003-03-11 09:30:37 +0000
commitb33e61633a10a233510f6f49b97b7e2ad15c7311 (patch)
tree9b6025b692435f629bc771dca74dcfb48e41768a /nptl/sysdeps/pthread/pthread_cond_timedwait.c
parent5d5d5969b17422e3b1af6f88436e91f32a36fd58 (diff)
downloadglibc-b33e61633a10a233510f6f49b97b7e2ad15c7311.tar.gz
glibc-b33e61633a10a233510f6f49b97b7e2ad15c7311.tar.xz
glibc-b33e61633a10a233510f6f49b97b7e2ad15c7311.zip
* sysdeps/generic/dl-sysdep.c (_dl_important_hwcaps): If CNT == 1,
	allocate space even for the trailing '/'.
	Reported by John Reiser <jreiser@BitWagon.com>.

	* sysdeps/unix/sysv/linux/ia64/sysdep.h (LOAD_ARGS_6, ASM_ARGS_6,
	ASM_CLOBBERS_6): Define.
	(ASM_CLOBBERS_5): Use ASM_CLOBBERS_6.
	* sysdeps/unix/sysv/linux/ia64/clone2.S (__clone2): Reorder arguments
	to match IA-32 order.
	* sysdeps/unix/sysv/linux/i386/clone.S: Fix comment.
Diffstat (limited to 'nptl/sysdeps/pthread/pthread_cond_timedwait.c')
-rw-r--r--nptl/sysdeps/pthread/pthread_cond_timedwait.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/nptl/sysdeps/pthread/pthread_cond_timedwait.c b/nptl/sysdeps/pthread/pthread_cond_timedwait.c
index 3b29cb4ea6..d6a4ae7cfe 100644
--- a/nptl/sysdeps/pthread/pthread_cond_timedwait.c
+++ b/nptl/sysdeps/pthread/pthread_cond_timedwait.c
@@ -46,7 +46,7 @@ __pthread_cond_timedwait (cond, mutex, abstime)
 {
   struct _pthread_cleanup_buffer buffer;
   struct _condvar_cleanup_buffer cbuffer;
-  int result = 0;
+  int result = 0, err;
 
   /* Catch invalid parameters.  */
   if (abstime->tv_nsec >= 1000000000)
@@ -56,7 +56,12 @@ __pthread_cond_timedwait (cond, mutex, abstime)
   lll_mutex_lock (cond->__data.__lock);
 
   /* Now we can release the mutex.  */
-  __pthread_mutex_unlock_internal (mutex);
+  err = __pthread_mutex_unlock_internal (mutex);
+  if (err)
+    {
+      lll_mutex_unlock (cond->__data.__lock);
+      return err;
+    }
 
   /* We have one new user of the condvar.  */
   ++cond->__data.__total_seq;