diff options
Diffstat (limited to 'nptl/pthread_cond_wait.c')
-rw-r--r-- | nptl/pthread_cond_wait.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/nptl/pthread_cond_wait.c b/nptl/pthread_cond_wait.c index 0d6558b642..9db01d243d 100644 --- a/nptl/pthread_cond_wait.c +++ b/nptl/pthread_cond_wait.c @@ -86,7 +86,7 @@ __condvar_cleanup (void *arg) /* Get the mutex before returning unless asynchronous cancellation is in effect. We don't try to get the mutex if we already own it. */ - if (!(USE_REQUEUE_PI (cbuffer->mutex)) + if (!(use_requeue_pi (cbuffer->mutex)) || ((cbuffer->mutex->__data.__lock & FUTEX_TID_MASK) != THREAD_GETMEM (THREAD_SELF, tid))) { @@ -106,8 +106,7 @@ __pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex) int pshared = (cond->__data.__mutex == (void *) ~0l) ? LLL_SHARED : LLL_PRIVATE; -#if (defined lll_futex_wait_requeue_pi \ - && defined __ASSUME_REQUEUE_PI) +#ifdef lll_futex_wait_requeue_pi int pi_flag = 0; #endif @@ -160,8 +159,7 @@ __pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex) /* Enable asynchronous cancellation. Required by the standard. */ cbuffer.oldtype = __pthread_enable_asynccancel (); -#if (defined lll_futex_wait_requeue_pi \ - && defined __ASSUME_REQUEUE_PI) +#ifdef lll_futex_wait_requeue_pi /* If pi_flag remained 1 then it means that we had the lock and the mutex but a spurious waker raced ahead of us. Give back the mutex before going into wait again. */ @@ -170,7 +168,7 @@ __pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex) __pthread_mutex_cond_lock_adjust (mutex); __pthread_mutex_unlock_usercnt (mutex, 0); } - pi_flag = USE_REQUEUE_PI (mutex); + pi_flag = use_requeue_pi (mutex); if (pi_flag) { @@ -221,8 +219,7 @@ __pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex) __pthread_cleanup_pop (&buffer, 0); /* Get the mutex before returning. Not needed for PI. */ -#if (defined lll_futex_wait_requeue_pi \ - && defined __ASSUME_REQUEUE_PI) +#ifdef lll_futex_wait_requeue_pi if (pi_flag) { __pthread_mutex_cond_lock_adjust (mutex); |