summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc/0005-Remove-__ASSUME_REQUEUE_PI.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/glibc/glibc/0005-Remove-__ASSUME_REQUEUE_PI.patch')
-rw-r--r--meta/recipes-core/glibc/glibc/0005-Remove-__ASSUME_REQUEUE_PI.patch149
1 files changed, 149 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/0005-Remove-__ASSUME_REQUEUE_PI.patch b/meta/recipes-core/glibc/glibc/0005-Remove-__ASSUME_REQUEUE_PI.patch
new file mode 100644
index 0000000000..8d4ba41078
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0005-Remove-__ASSUME_REQUEUE_PI.patch
@@ -0,0 +1,149 @@
1From 27b7131d3d8133bf3a5ce72d4e4ff4dfadd71f20 Mon Sep 17 00:00:00 2001
2From: Catalin Enache <catalin.enache@windriver.com>
3Date: Fri, 30 Jun 2017 12:08:29 +0300
4Subject: [PATCH 5/6] Remove __ASSUME_REQUEUE_PI
5
6The new cond var implementation (ed19993b5b0d) removed all the
7__ASSUME_{REQUEUE_PI,FUTEX_LOCK_PI} internal usage so there is no
8need to keep defining it. This patch removes all USE_REQUEUE_PI
9and __ASSUME_REQUEUE_PI. It is as follow up from BZ#18463.
10
11Checked with a build for x86_64-linux-gnu, arm-linux-gnueabhf,
12m68-linux-gnu, mips64-linux-gnu, and sparc64-linux-gnu.
13
14 * nptl/pthreadP.h (USE_REQUEUE_PI): Remove ununsed macro.
15 * sysdeps/unix/sysv/linux/arm/kernel-features.h
16 (__ASSUME_REQUEUE_PI): Likewise.
17 * sysdeps/unix/sysv/linux/kernel-features.h
18 (__ASSUME_REQUEUE_PI): Likewise.
19 * sysdeps/unix/sysv/linux/m68k/kernel-features.h
20 (__ASSUME_REQUEUE_PI): Likewise.
21 * sysdeps/unix/sysv/linux/mips/kernel-features.h
22 (__ASSUME_REQUEUE_PI): Likewise.
23 * sysdeps/unix/sysv/linux/sparc/kernel-features.h
24 (__ASSUME_REQUEUE_PI): Likewise.
25
26Upstream-Status: Backport
27
28Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
29Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
30---
31 ChangeLog | 14 ++++++++++++++
32 nptl/pthreadP.h | 12 ------------
33 sysdeps/unix/sysv/linux/arm/kernel-features.h | 1 -
34 sysdeps/unix/sysv/linux/kernel-features.h | 5 -----
35 sysdeps/unix/sysv/linux/m68k/kernel-features.h | 1 -
36 sysdeps/unix/sysv/linux/mips/kernel-features.h | 1 -
37 sysdeps/unix/sysv/linux/sparc/kernel-features.h | 1 -
38 7 files changed, 14 insertions(+), 21 deletions(-)
39
40diff --git a/ChangeLog b/ChangeLog
41index c94db7b..44c518b 100644
42--- a/ChangeLog
43+++ b/ChangeLog
44@@ -1,3 +1,17 @@
45+2017-04-04 Adhemerval Zanella <adhemerval.zanella@linaro.org>
46+
47+ * nptl/pthreadP.h (USE_REQUEUE_PI): Remove ununsed macro.
48+ * sysdeps/unix/sysv/linux/arm/kernel-features.h
49+ (__ASSUME_REQUEUE_PI): Likewise.
50+ * sysdeps/unix/sysv/linux/kernel-features.h
51+ (__ASSUME_REQUEUE_PI): Likewise.
52+ * sysdeps/unix/sysv/linux/m68k/kernel-features.h
53+ (__ASSUME_REQUEUE_PI): Likewise.
54+ * sysdeps/unix/sysv/linux/mips/kernel-features.h
55+ (__ASSUME_REQUEUE_PI): Likewise.
56+ * sysdeps/unix/sysv/linux/sparc/kernel-features.h
57+ (__ASSUME_REQUEUE_PI): Likewise.
58+
59 2016-12-31 Torvald Riegel <triegel@redhat.com>
60
61 [BZ #13165]
62diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
63index e9992bc..730c4ad 100644
64--- a/nptl/pthreadP.h
65+++ b/nptl/pthreadP.h
66@@ -594,18 +594,6 @@ extern void __wait_lookup_done (void) attribute_hidden;
67 # define PTHREAD_STATIC_FN_REQUIRE(name) __asm (".globl " #name);
68 #endif
69
70-/* Test if the mutex is suitable for the FUTEX_WAIT_REQUEUE_PI operation. */
71-#if (defined lll_futex_wait_requeue_pi \
72- && defined __ASSUME_REQUEUE_PI)
73-# define USE_REQUEUE_PI(mut) \
74- ((mut) && (mut) != (void *) ~0l \
75- && (((mut)->__data.__kind \
76- & (PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_NORMAL_NP)) \
77- == PTHREAD_MUTEX_PRIO_INHERIT_NP))
78-#else
79-# define USE_REQUEUE_PI(mut) 0
80-#endif
81-
82 /* Returns 0 if POL is a valid scheduling policy. */
83 static inline int
84 check_sched_policy_attr (int pol)
85diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h
86index 6ca607e..339ad45 100644
87--- a/sysdeps/unix/sysv/linux/arm/kernel-features.h
88+++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h
89@@ -23,7 +23,6 @@
90 futex_atomic_cmpxchg_inatomic, depending on kernel
91 configuration. */
92 #if __LINUX_KERNEL_VERSION < 0x030E03
93-# undef __ASSUME_REQUEUE_PI
94 # undef __ASSUME_SET_ROBUST_LIST
95 #endif
96
97diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
98index 1d3b554..9f2cf9f 100644
99--- a/sysdeps/unix/sysv/linux/kernel-features.h
100+++ b/sysdeps/unix/sysv/linux/kernel-features.h
101@@ -101,11 +101,6 @@
102 #define __ASSUME_PREADV 1
103 #define __ASSUME_PWRITEV 1
104
105-/* Support for FUTEX_*_REQUEUE_PI was added in 2.6.31 (but some
106- architectures lack futex_atomic_cmpxchg_inatomic in some
107- configurations). */
108-#define __ASSUME_REQUEUE_PI 1
109-
110 /* Support for recvmmsg functionality was added in 2.6.33. The macros
111 defined correspond to those for accept4. */
112 #if __LINUX_KERNEL_VERSION >= 0x020621
113diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/sysdeps/unix/sysv/linux/m68k/kernel-features.h
114index 46ec601..174c1c6 100644
115--- a/sysdeps/unix/sysv/linux/m68k/kernel-features.h
116+++ b/sysdeps/unix/sysv/linux/m68k/kernel-features.h
117@@ -51,6 +51,5 @@
118
119 /* No support for PI futexes or robust mutexes before 3.10 for m68k. */
120 #if __LINUX_KERNEL_VERSION < 0x030a00
121-# undef __ASSUME_REQUEUE_PI
122 # undef __ASSUME_SET_ROBUST_LIST
123 #endif
124diff --git a/sysdeps/unix/sysv/linux/mips/kernel-features.h b/sysdeps/unix/sysv/linux/mips/kernel-features.h
125index b486d90..a795911c 100644
126--- a/sysdeps/unix/sysv/linux/mips/kernel-features.h
127+++ b/sysdeps/unix/sysv/linux/mips/kernel-features.h
128@@ -24,7 +24,6 @@
129 /* The MIPS kernel does not support futex_atomic_cmpxchg_inatomic if
130 emulating LL/SC. */
131 #if __mips == 1 || defined _MIPS_ARCH_R5900
132-# undef __ASSUME_REQUEUE_PI
133 # undef __ASSUME_SET_ROBUST_LIST
134 #endif
135
136diff --git a/sysdeps/unix/sysv/linux/sparc/kernel-features.h b/sysdeps/unix/sysv/linux/sparc/kernel-features.h
137index 69c9c7c..dd3ddf0 100644
138--- a/sysdeps/unix/sysv/linux/sparc/kernel-features.h
139+++ b/sysdeps/unix/sysv/linux/sparc/kernel-features.h
140@@ -34,6 +34,5 @@
141 /* 32-bit SPARC kernels do not support
142 futex_atomic_cmpxchg_inatomic. */
143 #if !defined __arch64__ && !defined __sparc_v9__
144-# undef __ASSUME_REQUEUE_PI
145 # undef __ASSUME_SET_ROBUST_LIST
146 #endif
147--
1482.10.2
149