Skip to content

Commit

Permalink
AP_HAL_Linux: make all semaphores priority-inherit
Browse files Browse the repository at this point in the history
  • Loading branch information
rsaxvc authored and lucasdemarchi committed Sep 6, 2023
1 parent d9818ae commit c8f9d19
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libraries/AP_HAL_Linux/Semaphores.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit c8f9d19

Please sign in to comment.