glibc/glibc-disable-rwlock-elision.patch

16 lines
591 B
Diff
Raw Normal View History

Index: b/sysdeps/unix/sysv/linux/x86/elision-conf.c
===================================================================
--- a/sysdeps/unix/sysv/linux/x86/elision-conf.c
+++ b/sysdeps/unix/sysv/linux/x86/elision-conf.c
@@ -58,6 +58,10 @@ elision_init (int argc __attribute__ ((u
char **environ)
{
int elision_available = HAS_CPU_FEATURE (RTM);
+#ifndef ENABLE_LOCK_ELISION
+ /* Override the CPU feature if elision is not enabled. */
+ elision_available = 0;
+#endif
#ifdef ENABLE_LOCK_ELISION
__pthread_force_elision = __libc_enable_secure ? 0 : elision_available;
#endif