AP_HAL_Linux: use HAL_SEMAPHORE_BLOCK_FOREVER

This commit is contained in:
Peter Barker 2017-04-29 10:07:05 +10:00 committed by Francisco Ferreira
parent 3ff4cd8c07
commit 5a02219642

View File

@ -13,7 +13,7 @@ bool Semaphore::give()
bool Semaphore::take(uint32_t timeout_ms) bool Semaphore::take(uint32_t timeout_ms)
{ {
if (timeout_ms == 0) { if (timeout_ms == HAL_SEMAPHORE_BLOCK_FOREVER) {
return pthread_mutex_lock(&_lock) == 0; return pthread_mutex_lock(&_lock) == 0;
} }
if (take_nonblocking()) { if (take_nonblocking()) {