mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +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:
parent
f45b960eee
commit
5578b629a3
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user