about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/powerpc/elision-conf.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>2014-11-07 12:30:56 -0500
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>2015-01-12 06:30:54 -0500
commit4b45943a6f62cfc239e79ad8902f5c7f71fd13ec (patch)
treee297f0a960da29f470318e704890fbd52bf77fef /sysdeps/unix/sysv/linux/powerpc/elision-conf.c
parent8d2c0a593bdefd220be0822fb70de6b8d3bfd39d (diff)
downloadglibc-4b45943a6f62cfc239e79ad8902f5c7f71fd13ec.tar.gz
glibc-4b45943a6f62cfc239e79ad8902f5c7f71fd13ec.tar.xz
glibc-4b45943a6f62cfc239e79ad8902f5c7f71fd13ec.zip
powerpc: Add adaptive elision to rwlocks
This patch adds support for lock elision using ISA 2.07 hardware
transactional memory for rwlocks.  The logic is similar to the
one presented in pthread_mutex lock elision.
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc/elision-conf.c')
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/elision-conf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-conf.c b/sysdeps/unix/sysv/linux/powerpc/elision-conf.c
index 1d962e1d20..70fbbb2215 100644
--- a/sysdeps/unix/sysv/linux/powerpc/elision-conf.c
+++ b/sysdeps/unix/sysv/linux/powerpc/elision-conf.c
@@ -63,6 +63,9 @@ elision_init (int argc __attribute__ ((unused)),
   int elision_available = (GLRO (dl_hwcap2) & PPC_FEATURE2_HAS_HTM) ? 1 : 0;
   __pthread_force_elision = __libc_enable_secure ? 0 : elision_available;
 #endif
+  if (!__pthread_force_elision)
+    /* Disable elision on rwlocks.  */
+    __elision_aconf.try_tbegin = 0;
 }
 
 #ifdef SHARED