about summary refs log tree commit diff
path: root/src/thread
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2020-12-07 17:25:08 -0500
committerRich Felker <dalias@aerifal.cx>2020-12-07 17:25:08 -0500
commit90ff016996753d83263445940710c87d9afa71f3 (patch)
tree1bf3508bd432956c7daca4ff97df2e34fc8c7c43 /src/thread
parent56f0631d9553dc06530ff661527cf1fcd595a0d1 (diff)
downloadmusl-90ff016996753d83263445940710c87d9afa71f3.tar.gz
musl-90ff016996753d83263445940710c87d9afa71f3.tar.xz
musl-90ff016996753d83263445940710c87d9afa71f3.zip
fix omission of non-stub pthread_mutexattr_getprotocol
this change should have been made when priority inheritance mutex
support was added. if priority protection is also added at some point
the implementation will need to change and will probably no longer be
a simple bit shuffling.
Diffstat (limited to 'src/thread')
-rw-r--r--src/thread/pthread_attr_get.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread/pthread_attr_get.c b/src/thread/pthread_attr_get.c
index 4aa5afdb..f12ff442 100644
--- a/src/thread/pthread_attr_get.c
+++ b/src/thread/pthread_attr_get.c
@@ -70,7 +70,7 @@ int pthread_condattr_getpshared(const pthread_condattr_t *restrict a, int *restr
 
 int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *restrict a, int *restrict protocol)
 {
-	*protocol = PTHREAD_PRIO_NONE;
+	*protocol = a->__attr / 8U % 2;
 	return 0;
 }
 int pthread_mutexattr_getpshared(const pthread_mutexattr_t *restrict a, int *restrict pshared)