Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame^] | 1 | From c4ad832276f4dadfa40904109b26a521468f66bc Mon Sep 17 00:00:00 2001 |
| 2 | From: Florian Weimer <fweimer@redhat.com> |
| 3 | Date: Thu, 4 Feb 2021 15:00:20 +0100 |
| 4 | Subject: [PATCH] nptl: Remove private futex optimization [BZ #27304] |
| 5 | |
| 6 | It is effectively used, unexcept for pthread_cond_destroy, where we do |
| 7 | not want it; see bug 27304. The internal locks do not support a |
| 8 | process-shared mode. |
| 9 | |
| 10 | This fixes commit dc6cfdc934db9997c33728082d63552b9eee4563 ("nptl: |
| 11 | Move pthread_cond_destroy implementation into libc"). |
| 12 | |
| 13 | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> |
| 14 | |
| 15 | Upstream-Status: Backport [https://sourceware.org/bugzilla/show_bug.cgi?id=27304] |
| 16 | Signed-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 | |
| 21 | diff --git a/sysdeps/nptl/lowlevellock-futex.h b/sysdeps/nptl/lowlevellock-futex.h |
| 22 | index 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 | -- |
| 48 | 2.27.0 |
| 49 | |