posix: epicsMutexOsdShowAll check for PI support

This commit is contained in:
Michael Davidsaver
2021-03-02 06:47:43 -08:00
parent f8eb0be7a4
commit 3c46542630

View File

@@ -194,6 +194,7 @@ void epicsMutexOsdShow(struct epicsMutexOSD * pmutex, unsigned int level)
void epicsMutexOsdShowAll(void)
{
#if defined _POSIX_THREAD_PRIO_INHERIT
int proto = -1;
int ret = pthread_mutexattr_getprotocol(&globalAttrRecursive, &proto);
if(ret) {
@@ -201,4 +202,7 @@ void epicsMutexOsdShowAll(void)
} else {
printf("PI is%s enabled\n", proto==PTHREAD_PRIO_INHERIT ? "" : " not");
}
#else
printf("PI not supported\n");
#endif
}