From 1717da59aed9612becd56aaa1249aac695af4c8a Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Thu, 16 May 2013 19:17:14 -0700 Subject: Add a configure option to enable lock elision and disable by default Can be enabled with --enable-lock-elision=yes at configure time. --- configure | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'configure') diff --git a/configure b/configure index edde310..a873b20 100755 --- a/configure +++ b/configure @@ -742,6 +742,7 @@ enable_versioning enable_oldest_abi enable_hardcoded_path_in_tests enable_stackguard_randomization +enable_lock_elision enable_add_ons enable_hidden_plt enable_bind_now @@ -1399,6 +1400,9 @@ Optional Features: --enable-stackguard-randomization initialize __stack_chk_guard canary with a random number at program start + --enable-lock-elision=yes/no + Enable lock elision for pthread mutexes and rwlocks + by default --enable-add-ons[=DIRS...] configure and build add-ons in DIR1,DIR2,... search for add-ons if no parameter given @@ -3472,6 +3476,18 @@ if test "$enable_stackguard_randomize" = yes; then fi +# Check whether --enable-lock-elision was given. +if test "${enable_lock_elision+set}" = set; then : + enableval=$enable_lock_elision; enable_lock_elision=$enableval +else + enable_lock_elision=no +fi + +if test "$enable_lock_elision" = yes ; then + $as_echo "#define ENABLE_LOCK_ELISION 1" >>confdefs.h + +fi + # Check whether --enable-add-ons was given. if test "${enable_add_ons+set}" = set; then : enableval=$enable_add_ons; -- cgit v1.1