Hi,
While using MUSL C-library 1.1.22. we observed an issue with the pthread_mutexattr_getprotocol() implementation. The same implementation is in the latest version also.
When the priority inheritance mutexes were implemented, it seems that pthread_mutexattr_getprotocol() wasn’t updated to return the proper mutex protocol type.
The PI mutexes update was done in this commit:
http://git.musl-libc.org/cgit/musl/commit/?id=54ca677983d47529bab8752315ac1a2b49888870
If possible, maybe the get protocol function can be updated in a future merge.
In order to fix the get protocol function, we changed it to:
int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *restrict a, int *restrict protocol)
{
if (a->__attr & 8)
*protocol = PTHREAD_PRIO_INHERIT;
else
*protocol = PTHREAD_PRIO_NONE;
return 0;
}
Best Regards,
Bogdan Nistor |
||
Software Engineer |
||
Email |
Bogdan.Nistor@enea.com |
|
Phone |
+40 74 517 5795 |
|
|
||
|
||
|