about summary refs log tree commit diff
path: root/nptl/sysdeps/unix/sysv/linux
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2013-05-16 19:17:14 -0700
committerAndi Kleen <ak@linux.intel.com>2013-07-02 08:46:55 -0700
commit1717da59aed9612becd56aaa1249aac695af4c8a (patch)
tree0b69e8ee62804482fd7bd951c918abdd9d15c0a3 /nptl/sysdeps/unix/sysv/linux
parent49186d21ef2d87986bccaf0a7c45c48c91b265f3 (diff)
downloadglibc-1717da59aed9612becd56aaa1249aac695af4c8a.tar.gz
glibc-1717da59aed9612becd56aaa1249aac695af4c8a.tar.xz
glibc-1717da59aed9612becd56aaa1249aac695af4c8a.zip
Add a configure option to enable lock elision and disable by default
Can be enabled with --enable-lock-elision=yes at configure time.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86/elision-conf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.c b/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.c
index 6277e48d76..118cfa72f5 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.c
+++ b/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.c
@@ -16,6 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>. */
 
+#include "config.h"
 #include <pthreadP.h>
 #include <init-arch.h>
 #include <elision-conf.h>
@@ -70,8 +71,10 @@ elision_init (int argc __attribute__ ((unused)),
 	      char **environ)
 {
   __elision_available = HAS_RTM;
+#ifdef ENABLE_LOCK_ELISION
   __pthread_force_elision = __libc_enable_secure ? 0 : __elision_available;
   __rwlock_rtm_enabled = __libc_enable_secure ? 0 : __elision_available;
+#endif
 }
 
 #ifdef SHARED