diff options
author | Siddhesh Poyarekar <siddhesh@redhat.com> | 2013-10-03 08:26:21 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@redhat.com> | 2013-10-03 08:26:21 +0530 |
commit | 2770d15e7e880821fc586619c59eb45180628e16 (patch) | |
tree | aac8cfee611a22d6f86979c32f5be23cde28b640 /nptl/pthread_cond_broadcast.c | |
parent | f8a8e175b8325afb2b1b94630a04359951ea2afe (diff) | |
download | glibc-2770d15e7e880821fc586619c59eb45180628e16.tar.gz glibc-2770d15e7e880821fc586619c59eb45180628e16.tar.xz glibc-2770d15e7e880821fc586619c59eb45180628e16.zip |
Fix PI mutex check in pthread_cond_broadcast and pthread_cond_signal
Fixes BZ #15996. The check had a typo - it checked for PTHREAD_MUTEX_ROBUST_NP instead of PTHREAD_MUTEX_ROBUST_NORMAL_NP. It has now been replaced by the already existing convenience macro USE_REQUEUE_PI.
Diffstat (limited to 'nptl/pthread_cond_broadcast.c')
-rw-r--r-- | nptl/pthread_cond_broadcast.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/nptl/pthread_cond_broadcast.c b/nptl/pthread_cond_broadcast.c index 0702ec0ec2..7ba9efa0c0 100644 --- a/nptl/pthread_cond_broadcast.c +++ b/nptl/pthread_cond_broadcast.c @@ -63,10 +63,7 @@ __pthread_cond_broadcast (cond) #if (defined lll_futex_cmp_requeue_pi \ && defined __ASSUME_REQUEUE_PI) - int pi_flag = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_NP; - pi_flag &= mut->__data.__kind; - - if (pi_flag == PTHREAD_MUTEX_PRIO_INHERIT_NP) + if (USE_REQUEUE_PI (mut)) { if (lll_futex_cmp_requeue_pi (&cond->__data.__futex, 1, INT_MAX, &mut->__data.__lock, futex_val, |