Fix PI mutex check for non-x86 and resync with upstream master
This commit is contained in:
parent
a9c7f8acc7
commit
4ef9594328
|
@ -0,0 +1,46 @@
|
|||
commit ab8473b63982c814cdf509b8061fe0152cf3fd39
|
||||
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
Date: Tue Oct 1 14:29:00 2013 +0530
|
||||
|
||||
Fix PI mutex check in pthread_cond_broadcast and pthread_cond_signal
|
||||
|
||||
The check had a typo - it checked for PTHREAD_MUTEX_ROBUST instead of
|
||||
PTHREAD_MUTEX_NORMAL_ROBUST_NP. It has now been replaced by the
|
||||
already existing convenience macro USE_REQUEUE_PI.
|
||||
|
||||
diff --git a/nptl/pthread_cond_broadcast.c b/nptl/pthread_cond_broadcast.c
|
||||
index 0702ec0..7ba9efa 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,
|
||||
diff --git a/nptl/pthread_cond_signal.c b/nptl/pthread_cond_signal.c
|
||||
index 102d0b3..ffc35dc 100644
|
||||
--- a/nptl/pthread_cond_signal.c
|
||||
+++ b/nptl/pthread_cond_signal.c
|
||||
@@ -49,14 +49,9 @@ __pthread_cond_signal (cond)
|
||||
|
||||
#if (defined lll_futex_cmp_requeue_pi \
|
||||
&& defined __ASSUME_REQUEUE_PI)
|
||||
- int pi_flag = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_NP;
|
||||
pthread_mutex_t *mut = cond->__data.__mutex;
|
||||
|
||||
- /* Do not use requeue for pshared condvars. */
|
||||
- if (mut != (void *) ~0l)
|
||||
- pi_flag &= mut->__data.__kind;
|
||||
-
|
||||
- if (__builtin_expect (pi_flag == PTHREAD_MUTEX_PRIO_INHERIT_NP, 0)
|
||||
+ if (USE_REQUEUE_PI (mut)
|
||||
/* This can only really fail with a ENOSYS, since nobody can modify
|
||||
futex while we have the cond_lock. */
|
||||
&& lll_futex_cmp_requeue_pi (&cond->__data.__futex, 1, 0,
|
11
glibc.spec
11
glibc.spec
|
@ -1,6 +1,6 @@
|
|||
%define glibcsrcdir glibc-2.18-151-g303e567
|
||||
%define glibcsrcdir glibc-2.18-186-gfd96752
|
||||
%define glibcversion 2.18.90
|
||||
%define glibcrelease 6%{?dist}
|
||||
%define glibcrelease 7%{?dist}
|
||||
# Pre-release tarballs are pulled in from git using a command that is
|
||||
# effectively:
|
||||
#
|
||||
|
@ -211,6 +211,8 @@ Patch2026: %{name}-rh841787.patch
|
|||
# Upstream BZ 14185
|
||||
Patch2027: %{name}-rh819430.patch
|
||||
|
||||
Patch2028: %{name}-rh1007590.patch
|
||||
|
||||
##############################################################################
|
||||
# End of glibc patches.
|
||||
##############################################################################
|
||||
|
@ -536,6 +538,7 @@ package or when debugging this package.
|
|||
%patch0041 -p1
|
||||
%patch0042 -p1
|
||||
%patch0043 -p1
|
||||
%patch2028 -p1
|
||||
|
||||
##############################################################################
|
||||
# %%prep - Additional prep required...
|
||||
|
@ -1621,6 +1624,10 @@ rm -f *.filelist*
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Oct 1 2013 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.18.90-7
|
||||
- Fix check for PI mutex on non-x86 systems (#1007590).
|
||||
- Resync with upstream master.
|
||||
|
||||
* Tue Sep 24 2013 Carlos O'Donell <carlos@redhat.com> - 2.18.90-6
|
||||
- Avoid the use of __block which is a reserved keyword for clang++
|
||||
(#1009623).
|
||||
|
|
Loading…
Reference in New Issue