public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Get rid of __elision_available
@ 2016-12-05 11:19 Andreas Schwab
  2016-12-07  4:50 ` Mike Frysinger
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Schwab @ 2016-12-05 11:19 UTC (permalink / raw)
  To: libc-alpha

There is nothing that uses that variable.

Andreas.

	* sysdeps/unix/sysv/linux/x86/elision-conf.h
	(__elision_available): Don't declare.
	* sysdeps/unix/sysv/linux/x86/elision-conf.c
	(__elision_available): Don't define.
	(elision_init): Don't set __elision_available.
---
 sysdeps/unix/sysv/linux/x86/elision-conf.c | 11 +++--------
 sysdeps/unix/sysv/linux/x86/elision-conf.h |  1 -
 2 files changed, 3 insertions(+), 9 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 */
 }
 
diff --git a/sysdeps/unix/sysv/linux/x86/elision-conf.h b/sysdeps/unix/sysv/linux/x86/elision-conf.h
index 6c479b31e7..39bf5d9dd7 100644
--- a/sysdeps/unix/sysv/linux/x86/elision-conf.h
+++ b/sysdeps/unix/sysv/linux/x86/elision-conf.h
@@ -33,7 +33,6 @@ struct elision_config
 
 extern struct elision_config __elision_aconf attribute_hidden;
 
-extern int __elision_available attribute_hidden;
 extern int __pthread_force_elision attribute_hidden;
 
 /* Tell the test suite to test elision for this architecture.  */
-- 
2.11.0

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Get rid of __elision_available
  2016-12-05 11:19 [PATCH] Get rid of __elision_available Andreas Schwab
@ 2016-12-07  4:50 ` Mike Frysinger
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2016-12-07  4:50 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: libc-alpha

[-- Attachment #1: Type: text/plain, Size: 98 bytes --]

On 05 Dec 2016 12:19, Andreas Schwab wrote:
> There is nothing that uses that variable.

OK
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-07  4:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-05 11:19 [PATCH] Get rid of __elision_available Andreas Schwab
2016-12-07  4:50 ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).