diff options
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/pthread_mutex_lock.c | 7 | ||||
-rw-r--r-- | nptl/pthread_mutex_timedlock.c | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/nptl/pthread_mutex_lock.c b/nptl/pthread_mutex_lock.c index 762059b230..47b88a6b5b 100644 --- a/nptl/pthread_mutex_lock.c +++ b/nptl/pthread_mutex_lock.c @@ -304,10 +304,9 @@ __pthread_mutex_lock_full (pthread_mutex_t *mutex) meantime. */ if ((oldval & FUTEX_WAITERS) == 0) { - int val; - if ((val = atomic_compare_and_exchange_val_acq - (&mutex->__data.__lock, oldval | FUTEX_WAITERS, - oldval)) != oldval) + int val = atomic_compare_and_exchange_val_acq + (&mutex->__data.__lock, oldval | FUTEX_WAITERS, oldval); + if (val != oldval) { oldval = val; continue; diff --git a/nptl/pthread_mutex_timedlock.c b/nptl/pthread_mutex_timedlock.c index f763cfc7fa..791a2b54b1 100644 --- a/nptl/pthread_mutex_timedlock.c +++ b/nptl/pthread_mutex_timedlock.c @@ -233,10 +233,9 @@ __pthread_mutex_clocklock_common (pthread_mutex_t *mutex, meantime. */ if ((oldval & FUTEX_WAITERS) == 0) { - int val; - if ((val = atomic_compare_and_exchange_val_acq - (&mutex->__data.__lock, oldval | FUTEX_WAITERS, - oldval)) != oldval) + int val = atomic_compare_and_exchange_val_acq + (&mutex->__data.__lock, oldval | FUTEX_WAITERS, oldval); + if (val != oldval) { oldval = val; continue; |