px4_work_queue: sem_wait add loop as the wait may be interrupted by a signal

This commit is contained in:
Daniel Agar
2020-04-05 10:12:24 -04:00
committed by Beat Küng
parent 9404b19906
commit 1d164c0dbd
2 changed files with 4 additions and 2 deletions
@@ -149,7 +149,8 @@ void
WorkQueue::Run()
{
while (!should_exit()) {
px4_sem_wait(&_process_lock);
// loop as the wait may be interrupted by a signal
do {} while (px4_sem_wait(&_process_lock) != 0);
work_lock();