From c8f9d193fb5cba9091b84d1cc9cc93dbd00b4a20 Mon Sep 17 00:00:00 2001 From: Richard Allen Date: Mon, 17 Jul 2023 04:30:10 +0100 Subject: [PATCH] AP_HAL_Linux: make all semaphores priority-inherit --- libraries/AP_HAL_Linux/Semaphores.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/AP_HAL_Linux/Semaphores.cpp b/libraries/AP_HAL_Linux/Semaphores.cpp index d07a71baee..dcc0e7af41 100644 --- a/libraries/AP_HAL_Linux/Semaphores.cpp +++ b/libraries/AP_HAL_Linux/Semaphores.cpp @@ -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); }