POSIX Pthreads pthread_mutexattr_setprotocol

Hi, I am trying to use pthread_mutexattr_setprotocol with FreeRTOS+POSIX for my application. However, in pthread.h file, there is no setprotocol attribute. My question is that is setprotocol attribute not supported? If it is not supported, what can I do instead of using setprotocol as I used on Linux?

As I can see here, the function pthread_mutexattr_setprotocol is used to define how the mutex handles priority inversion problem. FreeRTOS mutex use the priority inheritance mechanism to address priority inversion which is roughly similar to PTHREAD_PRIO_INHERIT .

FreeRTOS+POSIX implements only a subset of POSIX APIs. Why do you not want to use native FreeRTOS APIs?

1 Like

Thank you for your answer. The reason I want to use setprotocol is that I need to run an application on freeRTOS which is currently running on Linux. Therefore, I wanted to find an equal API. I will try to find a new approach thanks to your answer.