blockingqueue.hpp: Disable priority inheritance for signaling semaphores

The head/tail semaphores are not used as lock but rather as resource
counters and thus relate more as signaling semaphores. Disable PI for
them.

I run my code with CONFIG_DEBUG_ASSERTIONS=y and the kernel panics due
to the semaphore having no holder, disabling PI fixes this.
This commit is contained in:
Ville Juven 2023-10-04 16:21:13 +03:00 committed by Daniel Agar
parent f45b960eee
commit 5578b629a3
1 changed files with 2 additions and 0 deletions

View File

@ -46,6 +46,8 @@ public:
{
px4_sem_init(&_sem_head, 0, N);
px4_sem_init(&_sem_tail, 0, 0);
px4_sem_setprotocol(&_sem_head, SEM_PRIO_NONE);
px4_sem_setprotocol(&_sem_tail, SEM_PRIO_NONE);
}
~BlockingQueue()