AP_HAL_Linux: make all semaphores priority-inherit

This commit is contained in:
Richard Allen 2023-07-17 04:30:10 +01:00 committed by Lucas De Marchi
parent d9818ae1ab
commit c8f9d193fb

View File

@ -11,6 +11,7 @@ Semaphore::Semaphore()
{
pthread_mutexattr_t attr;
pthread_mutexattr_init(&attr);
pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT);
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
pthread_mutex_init(&_lock, &attr);
}