about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/x86/elision-conf.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2016-12-05 12:06:46 +0100
committerAndreas Schwab <schwab@suse.de>2016-12-07 09:35:07 +0100
commit657c084cd6f69d6cc880c2ae65129a0723d053c5 (patch)
tree230d16f0d2e4ed4df4231135b1e0935cd7593b03 /sysdeps/unix/sysv/linux/x86/elision-conf.c
parent1dae0a14439a2d530402e9770359648c7eb3a784 (diff)
downloadglibc-657c084cd6f69d6cc880c2ae65129a0723d053c5.tar.gz
glibc-657c084cd6f69d6cc880c2ae65129a0723d053c5.tar.xz
glibc-657c084cd6f69d6cc880c2ae65129a0723d053c5.zip
Get rid of __elision_available
Diffstat (limited to 'sysdeps/unix/sysv/linux/x86/elision-conf.c')
-rw-r--r--sysdeps/unix/sysv/linux/x86/elision-conf.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sysdeps/unix/sysv/linux/x86/elision-conf.c b/sysdeps/unix/sysv/linux/x86/elision-conf.c
index 0d98133804..c8e77a64ee 100644
--- a/sysdeps/unix/sysv/linux/x86/elision-conf.c
+++ b/sysdeps/unix/sysv/linux/x86/elision-conf.c
@@ -43,11 +43,6 @@ struct elision_config __elision_aconf =
     .skip_trylock_internal_abort = 3,
   };
 
-/* Set when the CPU supports elision.  When false elision is never attempted.
- */
-
-int __elision_available attribute_hidden;
-
 /* Force elision for all new locks.  This is used to decide whether existing
    DEFAULT locks should be automatically upgraded to elision in
    pthread_mutex_lock().  Disabled for suid programs.  Only used when elision
@@ -62,11 +57,11 @@ elision_init (int argc __attribute__ ((unused)),
 	      char **argv  __attribute__ ((unused)),
 	      char **environ)
 {
-  __elision_available = HAS_CPU_FEATURE (RTM);
+  int elision_available = HAS_CPU_FEATURE (RTM);
 #ifdef ENABLE_LOCK_ELISION
-  __pthread_force_elision = __libc_enable_secure ? 0 : __elision_available;
+  __pthread_force_elision = __libc_enable_secure ? 0 : elision_available;
 #endif
-  if (!HAS_CPU_FEATURE (RTM))
+  if (!elision_available)
     __elision_aconf.retry_try_xbegin = 0; /* Disable elision on rwlocks */
 }