mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
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.
This commit is contained in:
@ -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 ();
|
||||
|
Reference in New Issue
Block a user