summary refs log tree commit diff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-08-13 03:40:40 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-08-13 03:41:59 -0700
commitb376899d27e5ac892f0339cf1bbb3d2158347db8 (patch)
tree10e8197ace2c56fee705a587232183c0357bb5fd
parent1dfa4a94aea3249f9c6e577d795df420688cd8e3 (diff)
downloadglibc-b376899d27e5ac892f0339cf1bbb3d2158347db8.tar.gz
glibc-b376899d27e5ac892f0339cf1bbb3d2158347db8.tar.xz
glibc-b376899d27e5ac892f0339cf1bbb3d2158347db8.zip
Update x86 elision-conf.c for <cpu-features.h>
This patch updates x86 elision-conf.c to use the newly defined
HAS_CPU_FEATURE from <cpu-features.h>.

	* sysdeps/unix/sysv/linux/x86/elision-conf.c (elision_init):
	Replace HAS_RTM with HAS_CPU_FEATURE (RTM).
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/unix/sysv/linux/x86/elision-conf.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c0fe4cdf92..5d1cd0f5d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2015-08-13  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* sysdeps/unix/sysv/linux/x86/elision-conf.c (elision_init):
+	Replace HAS_RTM with HAS_CPU_FEATURE (RTM).
+
+2015-08-13  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* math/Makefile ($(addprefix $(objpfx), $(libm-vec-tests))):
 	Remove $(objpfx)init-arch.o.
 	* sysdeps/x86_64/fpu/Makefile (libmvec-support): Remove
diff --git a/sysdeps/unix/sysv/linux/x86/elision-conf.c b/sysdeps/unix/sysv/linux/x86/elision-conf.c
index 84902aca3c..4a73382975 100644
--- a/sysdeps/unix/sysv/linux/x86/elision-conf.c
+++ b/sysdeps/unix/sysv/linux/x86/elision-conf.c
@@ -62,11 +62,11 @@ elision_init (int argc __attribute__ ((unused)),
 	      char **argv  __attribute__ ((unused)),
 	      char **environ)
 {
-  __elision_available = HAS_RTM;
+  __elision_available = HAS_CPU_FEATURE (RTM);
 #ifdef ENABLE_LOCK_ELISION
   __pthread_force_elision = __libc_enable_secure ? 0 : __elision_available;
 #endif
-  if (!HAS_RTM)
+  if (!HAS_CPU_FEATURE (RTM))
     __elision_aconf.retry_try_xbegin = 0; /* Disable elision on rwlocks */
 }