diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-03-03 21:11:12 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-03-03 21:11:12 +0000 |
commit | 7ce5c1640cbeb86d2094d992f30438ddda40ac14 (patch) | |
tree | 63f44821134b350f7eef50c06f75b4a4caf5b71b /nptl/sysdeps/unix | |
parent | 625f22fc7f8e0d61e3e6cff2c65468b91dbad426 (diff) | |
download | glibc-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/unix')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c | 25 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.c | 2 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/s390/sem_post.c | 2 |
3 files changed, 24 insertions, 5 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c b/nptl/sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c index 40b5c3e441..7035479c1a 100644 --- a/nptl/sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c +++ b/nptl/sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c @@ -17,5 +17,26 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -/* No difference to lowlevellock.c */ -#include "lowlevellock.c" +#include <errno.h> +#include <sysdep.h> +#include <lowlevellock.h> +#include <sys/time.h> + + +void +___lll_lock (futex, newval) + int *futex; + int newval; +{ + do + { + int oldval; + + lll_futex_wait (futex, newval); + lll_compare_and_swap (futex, oldval, newval, "lr %2,%1; ahi %2,-1"); + } + while (newval != 0); + + *futex = -1; +} +hidden_proto (___lll_lock) diff --git a/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.c b/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.c index bc501c7ee4..f98e163ae1 100644 --- a/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.c +++ b/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.c @@ -42,7 +42,6 @@ ___lll_lock (futex, newval) hidden_proto (___lll_lock) -/* XXX Should not be in libc.so */ int lll_unlock_wake_cb (futex) int *futex; @@ -58,7 +57,6 @@ lll_unlock_wake_cb (futex) hidden_proto (lll_unlock_wake_cb) -/* XXX Should not be in libc.so */ int ___lll_timedwait_tid (ptid, abstime) int *ptid; diff --git a/nptl/sysdeps/unix/sysv/linux/s390/sem_post.c b/nptl/sysdeps/unix/sysv/linux/s390/sem_post.c index df64c03ba6..b573532a32 100644 --- a/nptl/sysdeps/unix/sysv/linux/s390/sem_post.c +++ b/nptl/sysdeps/unix/sysv/linux/s390/sem_post.c @@ -34,7 +34,7 @@ __new_sem_post (sem_t *sem) lll_compare_and_swap ((int *) sem, oldval, newval, "lr %2,%1; ahi %2,1"); err = lll_futex_wake(((int *) sem), newval); - if (err != 0) + if (err < 0) { __set_errno(-err); return -1; |