blob: 39fde5b78543a41a0f27662fd646ce102ee84085 [file] [log] [blame]
Andrew Geissler95ac1b82021-03-31 14:34:31 -05001From c4ad832276f4dadfa40904109b26a521468f66bc Mon Sep 17 00:00:00 2001
2From: Florian Weimer <fweimer@redhat.com>
3Date: Thu, 4 Feb 2021 15:00:20 +0100
4Subject: [PATCH] nptl: Remove private futex optimization [BZ #27304]
5
6It is effectively used, unexcept for pthread_cond_destroy, where we do
7not want it; see bug 27304. The internal locks do not support a
8process-shared mode.
9
10This fixes commit dc6cfdc934db9997c33728082d63552b9eee4563 ("nptl:
11Move pthread_cond_destroy implementation into libc").
12
13Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
14
15Upstream-Status: Backport [https://sourceware.org/bugzilla/show_bug.cgi?id=27304]
16Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
17---
18 sysdeps/nptl/lowlevellock-futex.h | 14 +-------------
19 1 file changed, 1 insertion(+), 13 deletions(-)
20
21diff --git a/sysdeps/nptl/lowlevellock-futex.h b/sysdeps/nptl/lowlevellock-futex.h
22index ecb729da6b..ca96397a4a 100644
23--- a/sysdeps/nptl/lowlevellock-futex.h
24+++ b/sysdeps/nptl/lowlevellock-futex.h
25@@ -50,20 +50,8 @@
26 #define LLL_SHARED FUTEX_PRIVATE_FLAG
27
28 #ifndef __ASSEMBLER__
29-
30-# if IS_IN (libc) || IS_IN (rtld)
31-/* In libc.so or ld.so all futexes are private. */
32-# define __lll_private_flag(fl, private) \
33- ({ \
34- /* Prevent warnings in callers of this macro. */ \
35- int __lll_private_flag_priv __attribute__ ((unused)); \
36- __lll_private_flag_priv = (private); \
37- ((fl) | FUTEX_PRIVATE_FLAG); \
38- })
39-# else
40-# define __lll_private_flag(fl, private) \
41+# define __lll_private_flag(fl, private) \
42 (((fl) | FUTEX_PRIVATE_FLAG) ^ (private))
43-# endif
44
45 # define lll_futex_syscall(nargs, futexp, op, ...) \
46 ({ \
47--
482.27.0
49