aboutsummaryrefslogtreecommitdiff
path: root/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-03-03 21:11:12 +0000
committerUlrich Drepper <drepper@redhat.com>2003-03-03 21:11:12 +0000
commit7ce5c1640cbeb86d2094d992f30438ddda40ac14 (patch)
tree63f44821134b350f7eef50c06f75b4a4caf5b71b /nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c
parent625f22fc7f8e0d61e3e6cff2c65468b91dbad426 (diff)
downloadglibc-7ce5c1640cbeb86d2094d992f30438ddda40ac14.tar
glibc-7ce5c1640cbeb86d2094d992f30438ddda40ac14.tar.gz
glibc-7ce5c1640cbeb86d2094d992f30438ddda40ac14.tar.bz2
glibc-7ce5c1640cbeb86d2094d992f30438ddda40ac14.zip
Update.
2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com> * atomic.h (atomic_exchange_and_add): Return newval, not oldval. * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait): Fix handling of cancellation and failing pthread_mutex_unlock call. * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise. (__pthread_cond_wait): Likewise. * sysdeps/pthread/pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Fix clobber of result variable by lll_futex_timed_wait call. * sysdeps/pthread/pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise. * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock): Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so. * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments. * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix check of lll_futex_wake return value.
Diffstat (limited to 'nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c')
-rw-r--r--nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c b/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c
index fb6382544e..9c1815570f 100644
--- a/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c
+++ b/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c
@@ -37,6 +37,8 @@ pthread_rwlock_timedrdlock (rwlock, abstime)
while (1)
{
+ int err;
+
/* Get the rwlock if there is no writer... */
if (rwlock->__data.__writer == 0
/* ...and if either no writer is waiting or we prefer readers. */
@@ -111,14 +113,14 @@ pthread_rwlock_timedrdlock (rwlock, abstime)
lll_mutex_unlock (rwlock->__data.__lock);
/* Wait for the writer to finish. */
- result = lll_futex_timed_wait (&rwlock->__data.__readers_wakeup,
- waitval, &rt);
+ err = lll_futex_timed_wait (&rwlock->__data.__readers_wakeup,
+ waitval, &rt);
/* Get the lock. */
lll_mutex_lock (rwlock->__data.__lock);
/* Did the futex call time out? */
- if (result == -ETIMEDOUT)
+ if (err == -ETIMEDOUT)
{
/* Yep, report it. */
result = ETIMEDOUT;