From d83b9f3c38a372591b9389507feaa53111f209e0 Mon Sep 17 00:00:00 2001 From: Ville Juven Date: Wed, 4 Oct 2023 17:04:35 +0300 Subject: [PATCH] WorkItemSingleShot: Disable priority inheritance for signaling semaphore WorkItemSingleShot::_sem is a signaling semaphore, disable PI for it. Set CONFIG_DEBUG_ASSERTIONS=y and the kernel panics due to the semaphore having no holder, disabling PI fixes this. --- platforms/common/px4_work_queue/WorkItemSingleShot.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/platforms/common/px4_work_queue/WorkItemSingleShot.cpp b/platforms/common/px4_work_queue/WorkItemSingleShot.cpp index d31d51ab7b..77d24e2c2a 100644 --- a/platforms/common/px4_work_queue/WorkItemSingleShot.cpp +++ b/platforms/common/px4_work_queue/WorkItemSingleShot.cpp @@ -41,6 +41,7 @@ WorkItemSingleShot::WorkItemSingleShot(const px4::wq_config_t &config, worker_me : px4::WorkItem("", config), _argument(argument), _method(method) { px4_sem_init(&_sem, 0, 0); + px4_sem_setprotocol(&_sem, SEM_PRIO_NONE); } WorkItemSingleShot::WorkItemSingleShot(const px4::WorkItem &work_item, worker_method method, void *argument)