mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-25 16:56:25 +08:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user