Skip to content

Commit

Permalink
AP_HAL_Linux: use HAL_SEMAPHORE_BLOCK_FOREVER macro
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker authored and rmackay9 committed May 8, 2017
1 parent e9ce3aa commit c78f3b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libraries/AP_HAL_Linux/Scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ void Scheduler::register_timer_failsafe(AP_HAL::Proc failsafe, uint32_t period_u

void Scheduler::suspend_timer_procs()
{
if (!_timer_semaphore.take(0)) {
if (!_timer_semaphore.take(HAL_SEMAPHORE_BLOCK_FOREVER)) {
printf("Failed to take timer semaphore\n");
}
}
Expand All @@ -297,7 +297,7 @@ void Scheduler::_timer_task()
}
_in_timer_proc = true;

if (!_timer_semaphore.take(0)) {
if (!_timer_semaphore.take(HAL_SEMAPHORE_BLOCK_FOREVER)) {
printf("Failed to take timer semaphore in %s\n", __PRETTY_FUNCTION__);
}
// now call the timer based drivers
Expand Down Expand Up @@ -350,7 +350,7 @@ void Scheduler::_timer_task()

void Scheduler::_run_io(void)
{
if (!_io_semaphore.take(0)) {
if (!_io_semaphore.take(HAL_SEMAPHORE_BLOCK_FOREVER)) {
return;
}

Expand Down

0 comments on commit c78f3b9

Please sign in to comment.