diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-03-11 19:02:26 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-03-11 19:02:26 +0000 |
commit | f006d3a007b7caffd4c810fa71623b39334a1580 (patch) | |
tree | 77aa3aa11ab6c527e257648a6c7da97e233dd134 /nptl/sysdeps/pthread/pthread_cond_timedwait.c | |
parent | ea69482383319d05bed2d516a2cbb2a19549c1ce (diff) | |
download | glibc-f006d3a007b7caffd4c810fa71623b39334a1580.tar glibc-f006d3a007b7caffd4c810fa71623b39334a1580.tar.gz glibc-f006d3a007b7caffd4c810fa71623b39334a1580.tar.bz2 glibc-f006d3a007b7caffd4c810fa71623b39334a1580.zip |
Update.
* sysdeps/unix/sysv/linux/ia64/system.c: New file.
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_CLONE_THREAD_FLAGS): Define for IA-64 and s390* with
kernel >= 2.5.64.
2003-03-11 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Don't clobber R7.
Diffstat (limited to 'nptl/sysdeps/pthread/pthread_cond_timedwait.c')
-rw-r--r-- | nptl/sysdeps/pthread/pthread_cond_timedwait.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/nptl/sysdeps/pthread/pthread_cond_timedwait.c b/nptl/sysdeps/pthread/pthread_cond_timedwait.c index d6a4ae7cfe..417f873868 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, err; + int result = 0; /* Catch invalid parameters. */ if (abstime->tv_nsec >= 1000000000) @@ -56,7 +56,7 @@ __pthread_cond_timedwait (cond, mutex, abstime) lll_mutex_lock (cond->__data.__lock); /* Now we can release the mutex. */ - err = __pthread_mutex_unlock_internal (mutex); + int err = __pthread_mutex_unlock_internal (mutex); if (err) { lll_mutex_unlock (cond->__data.__lock); @@ -92,8 +92,6 @@ __pthread_cond_timedwait (cond, mutex, abstime) while (1) { - int err; - /* Get the current time. So far we support only one clock. */ struct timeval tv; (void) gettimeofday (&tv, NULL); @@ -162,9 +160,9 @@ __pthread_cond_timedwait (cond, mutex, abstime) __pthread_cleanup_pop (&buffer, 0); /* Get the mutex before returning. */ - __pthread_mutex_lock_internal (mutex); + err = __pthread_mutex_lock_internal (mutex); - return result; + return err ?: result; } versioned_symbol (libpthread, __pthread_cond_timedwait, pthread_cond_timedwait, |