diff options
Diffstat (limited to 'nptl/sysdeps/unix/sysv')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/sem_wait.c | 9 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/unregister-atfork.c | 2 |
2 files changed, 3 insertions, 8 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 (); diff --git a/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c b/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c index ac4b3c5d4c..72c8d615eb 100644 --- a/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c +++ b/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c @@ -104,7 +104,7 @@ __unregister_atfork (dso_handle) atomic_decrement (&deleted->handler->refcntr); unsigned int val; while ((val = deleted->handler->refcntr) != 0) - lll_futex_wait (deleted->handler->refcntr, val); + lll_futex_wait (&deleted->handler->refcntr, val); deleted = deleted->next; } |