diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-12-11 09:39:06 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-12-11 09:39:06 +0000 |
commit | ff48874d6a0d557eee3326b3a53e1503eb48f96d (patch) | |
tree | 0a2948e79a83985297a9618c855dd4336bad7100 /nptl/sysdeps/unix/sysv/linux/sem_wait.c | |
parent | 1d9d0b80d1412f8a272e0881d34538a041e56b4b (diff) | |
download | glibc-ff48874d6a0d557eee3326b3a53e1503eb48f96d.tar glibc-ff48874d6a0d557eee3326b3a53e1503eb48f96d.tar.gz glibc-ff48874d6a0d557eee3326b3a53e1503eb48f96d.tar.bz2 glibc-ff48874d6a0d557eee3326b3a53e1503eb48f96d.zip |
Update.
2003-12-11 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
Assume parameter is a pointer.
(lll_futex_wake): Likewise.
Reported by Boris Hu.
* sysdeps/unix/sysv/linux/unregister-atfork.c
(__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
* sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/sem_wait.c')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/sem_wait.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/sem_wait.c b/nptl/sysdeps/unix/sysv/linux/sem_wait.c index 36bb158e09..e6733e88a3 100644 --- a/nptl/sysdeps/unix/sysv/linux/sem_wait.c +++ b/nptl/sysdeps/unix/sysv/linux/sem_wait.c @@ -35,17 +35,12 @@ __new_sem_wait (sem_t *sem) CANCELLATION_P (THREAD_SELF); int *futex = (int *) sem; - int val; int err; do { - if (*futex > 0) - { - val = atomic_decrement_if_positive (futex); - if (val > 0) - return 0; - } + if (atomic_decrement_if_positive (futex) > 0) + return 0; /* Enable asynchronous cancellation. Required by the standard. */ int oldtype = __pthread_enable_asynccancel (); |