px4_work_queue: properly clean up

Fixes TSAN issues in unit tets.
This commit is contained in:
Julian Oes
2026-02-18 20:21:04 +13:00
parent 2ad0b297ca
commit d6c8514fea
3 changed files with 47 additions and 28 deletions
@@ -144,15 +144,6 @@ void WorkQueue::Add(WorkItem *item)
SignalWorkerThread();
}
void WorkQueue::SignalWorkerThread()
{
int sem_val;
if (px4_sem_getvalue(&_process_lock, &sem_val) == 0 && sem_val <= 0) {
px4_sem_post(&_process_lock);
}
}
void WorkQueue::Remove(WorkItem *item)
{
work_lock();