2016-12-09 17:38:16 +00:00
|
|
|
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
|
2014-09-27 16:31:11 +00:00
|
|
|
char **environ)
|
|
|
|
{
|
2016-12-09 17:38:16 +00:00
|
|
|
int elision_available = HAS_CPU_FEATURE (RTM);
|
|
|
|
+#ifndef ENABLE_LOCK_ELISION
|
|
|
|
+ /* Override the CPU feature if elision is not enabled. */
|
|
|
|
+ elision_available = 0;
|
2014-09-27 16:31:11 +00:00
|
|
|
+#endif
|
2016-12-09 17:38:16 +00:00
|
|
|
#ifdef ENABLE_LOCK_ELISION
|
|
|
|
__pthread_force_elision = __libc_enable_secure ? 0 : elision_available;
|
|
|
|
#endif
|