about summary refs log tree commit diff
diff options
context:
space:
mode:
authorStefan Liebler <stli@linux.vnet.ibm.com>2014-05-26 11:14:25 +0200
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>2014-05-26 11:14:25 +0200
commit673659263d956f45f1ce0c66900fa7f1129db74a (patch)
tree629746ccf6b5ffbae6820102c9b1217863ada476
parentf8bdf1f0b623f05a80cb23890f165cb0cf8bd8c3 (diff)
downloadglibc-673659263d956f45f1ce0c66900fa7f1129db74a.tar.gz
glibc-673659263d956f45f1ce0c66900fa7f1129db74a.tar.xz
glibc-673659263d956f45f1ce0c66900fa7f1129db74a.zip
Disable lock elision for PTHREAD_MUTEX_NORMAL.
-rw-r--r--ChangeLog6
-rw-r--r--nptl/pthread_mutexattr_settype.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e988e2b33c..823bb40108 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2014-05-26  Stefan Liebler  <stli@linux.vnet.ibm.com>
 
+	* nptl/pthread_mutexattr_settype.c
+	(__pthread_mutexattr_settype):
+	Disable lock elision for PTHREAD_MUTEX_NORMAL.
+
+2014-05-26  Stefan Liebler  <stli@linux.vnet.ibm.com>
+
 	* nptl/tst-mutex5 (do_test):
 	Use #ifndef ENABLE_LOCK_ELISION instead of #ifdef.
 
diff --git a/nptl/pthread_mutexattr_settype.c b/nptl/pthread_mutexattr_settype.c
index 0e912920d0..cf648cf6ef 100644
--- a/nptl/pthread_mutexattr_settype.c
+++ b/nptl/pthread_mutexattr_settype.c
@@ -32,7 +32,7 @@ __pthread_mutexattr_settype (attr, kind)
 
   /* Cannot distinguish between DEFAULT and NORMAL. So any settype
      call disables elision for now.  */
-  if (kind == PTHREAD_MUTEX_DEFAULT)
+  if (kind == PTHREAD_MUTEX_NORMAL)
     kind |= PTHREAD_MUTEX_NO_ELISION_NP;
 
   iattr = (struct pthread_mutexattr *) attr;