public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] nptl: Remove private futex optimization [BZ #27304]
@ 2021-02-01  8:46 Florian Weimer
  2021-02-01  9:24 ` Andreas Schwab
  2021-02-03 20:10 ` Adhemerval Zanella
  0 siblings, 2 replies; 4+ messages in thread
From: Florian Weimer @ 2021-02-01  8:46 UTC (permalink / raw)
  To: libc-alpha

It is effectively used, except for pthread_cond_destroy, where we do
not want it; see bug 27304.  The internal locks do not support a
process-shared mode.

This fixes commit dc6cfdc934db9997c33728082d63552b9eee4563 ("nptl:
Move pthread_cond_destroy implementation into libc").

Tested on i686-linux-gnu and x86_64-linux-gnu.  This is for glib 2.34,
although I intend to backport it to 2.32 and 2.33 because it looks like
it might be a regression.

---
 sysdeps/nptl/lowlevellock-futex.h | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/sysdeps/nptl/lowlevellock-futex.h b/sysdeps/nptl/lowlevellock-futex.h
index ecb729da6b..ca96397a4a 100644
--- a/sysdeps/nptl/lowlevellock-futex.h
+++ b/sysdeps/nptl/lowlevellock-futex.h
@@ -50,20 +50,8 @@
 #define LLL_SHARED	FUTEX_PRIVATE_FLAG
 
 #ifndef __ASSEMBLER__
-
-# if IS_IN (libc) || IS_IN (rtld)
-/* In libc.so or ld.so all futexes are private.  */
-#  define __lll_private_flag(fl, private)			\
-  ({								\
-    /* Prevent warnings in callers of this macro.  */		\
-    int __lll_private_flag_priv __attribute__ ((unused));	\
-    __lll_private_flag_priv = (private);			\
-    ((fl) | FUTEX_PRIVATE_FLAG);				\
-  })
-# else
-#  define __lll_private_flag(fl, private) \
+# define __lll_private_flag(fl, private) \
   (((fl) | FUTEX_PRIVATE_FLAG) ^ (private))
-# endif
 
 # define lll_futex_syscall(nargs, futexp, op, ...)                      \
   ({                                                                    \

-- 
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-02-03 20:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-01  8:46 [PATCH] nptl: Remove private futex optimization [BZ #27304] Florian Weimer
2021-02-01  9:24 ` Andreas Schwab
2021-02-01  9:25   ` Florian Weimer
2021-02-03 20:10 ` Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).