about summary refs log tree commit diff
path: root/nptl/pthread_mutexattr_gettype.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2014-08-11 11:18:26 +0200
committerAndreas Schwab <schwab@suse.de>2015-02-12 09:26:00 +0100
commit2868e0703d5b8c8e60c6f60de13e876c4d85daa0 (patch)
treec95b13872206f54b6b8b490619a57454eeeb0ed5 /nptl/pthread_mutexattr_gettype.c
parentebf27d12e602b428a316c105ed10371ed84d2d3d (diff)
downloadglibc-2868e0703d5b8c8e60c6f60de13e876c4d85daa0.tar.gz
glibc-2868e0703d5b8c8e60c6f60de13e876c4d85daa0.tar.xz
glibc-2868e0703d5b8c8e60c6f60de13e876c4d85daa0.zip
Filter out PTHREAD_MUTEX_NO_ELISION_NP bit in pthread_mutexattr_gettype (BZ #15790)
pthread_mutexattr_settype adds PTHREAD_MUTEX_NO_ELISION_NP to kind,
which is an internal flag that pthread_mutexattr_gettype shouldn't
expose, since pthread_mutexattr_settype wouldn't accept it.
Diffstat (limited to 'nptl/pthread_mutexattr_gettype.c')
-rw-r--r--nptl/pthread_mutexattr_gettype.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nptl/pthread_mutexattr_gettype.c b/nptl/pthread_mutexattr_gettype.c
index 72419bd4fe..0bf2c82813 100644
--- a/nptl/pthread_mutexattr_gettype.c
+++ b/nptl/pthread_mutexattr_gettype.c
@@ -28,7 +28,8 @@ pthread_mutexattr_gettype (attr, kind)
 
   iattr = (const struct pthread_mutexattr *) attr;
 
-  *kind = iattr->mutexkind & ~PTHREAD_MUTEXATTR_FLAG_BITS;
+  *kind = (iattr->mutexkind & ~PTHREAD_MUTEXATTR_FLAG_BITS
+	   & ~PTHREAD_MUTEX_NO_ELISION_NP);
 
   return 0;
 }