8ae002
commit 657c084cd6f69d6cc880c2ae65129a0723d053c5
8ae002
Author: Andreas Schwab <schwab@suse.de>
8ae002
Date:   Mon Dec 5 12:06:46 2016 +0100
8ae002
8ae002
    Get rid of __elision_available
8ae002
8ae002
Index: glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.c
8ae002
===================================================================
8ae002
--- glibc-2.17-c758a686.orig/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.c
8ae002
+++ glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.c
8ae002
@@ -52,11 +52,6 @@ int __rwlock_rtm_enabled attribute_hidde
8ae002
 
8ae002
 int __rwlock_rtm_read_retries attribute_hidden = 3;
8ae002
 
8ae002
-/* Set when the CPU supports elision.  When false elision is never attempted.
8ae002
- */
8ae002
-
8ae002
-int __elision_available attribute_hidden;
8ae002
-
8ae002
 /* Force elision for all new locks.  This is used to decide whether existing
8ae002
    DEFAULT locks should be automatically upgraded to elision in
8ae002
    pthread_mutex_lock().  Disabled for suid programs.  Only used when elision
8ae002
@@ -71,10 +66,10 @@ elision_init (int argc __attribute__ ((u
8ae002
 	      char **argv  __attribute__ ((unused)),
8ae002
 	      char **environ)
8ae002
 {
8ae002
-  __elision_available = HAS_CPU_FEATURE (RTM);
8ae002
+  int elision_available = HAS_CPU_FEATURE (RTM);
8ae002
 #ifdef ENABLE_LOCK_ELISION
8ae002
-  __pthread_force_elision = __libc_enable_secure ? 0 : __elision_available;
8ae002
-  __rwlock_rtm_enabled = __libc_enable_secure ? 0 : __elision_available;
8ae002
+  __pthread_force_elision = __libc_enable_secure ? 0 : elision_available;
8ae002
+  __rwlock_rtm_enabled = __libc_enable_secure ? 0 : elision_available;
8ae002
 #endif
8ae002
 }
8ae002
 
8ae002
Index: glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.h
8ae002
===================================================================
8ae002
--- glibc-2.17-c758a686.orig/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.h
8ae002
+++ glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.h
8ae002
@@ -35,7 +35,6 @@ struct elision_config
8ae002
 extern struct elision_config __elision_aconf attribute_hidden;
8ae002
 
8ae002
 extern int __rwlock_rtm_enabled attribute_hidden;
8ae002
-extern int __elision_available attribute_hidden;
8ae002
 extern int __pthread_force_elision attribute_hidden;
8ae002
 
8ae002
 /* Tell the test suite to test elision for this architecture.  */