Disable lock elision for PTHREAD_MUTEX_NORMAL.
authorStefan Liebler <stli@linux.vnet.ibm.com>
Mon, 26 May 2014 09:14:25 +0000 (11:14 +0200)
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Mon, 26 May 2014 09:14:25 +0000 (11:14 +0200)
ChangeLog
nptl/pthread_mutexattr_settype.c

index e988e2b..823bb40 100644 (file)
--- 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.
 
index 0e91292..cf648cf 100644 (file)
@@ -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;