mirror of https://github.com/ArduPilot/ardupilot
AP_HAL_Linux: fixed APM2 build
This commit is contained in:
parent
1698e1800c
commit
53f66b23f4
|
@ -1,3 +1,6 @@
|
|||
#include <AP_HAL.h>
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
|
||||
|
||||
#include "Semaphores.h"
|
||||
|
||||
|
@ -26,3 +29,5 @@ bool LinuxSemaphore::take_nonblocking()
|
|||
{
|
||||
return pthread_mutex_trylock(&_lock) == 0;
|
||||
}
|
||||
|
||||
#endif // CONFIG_HAL_BOARD
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
#ifndef __AP_HAL_LINUX_SEMAPHORE_H__
|
||||
#define __AP_HAL_LINUX_SEMAPHORE_H__
|
||||
|
||||
#include <AP_HAL_Boards.h>
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
|
||||
#include <AP_HAL_Linux.h>
|
||||
#include <pthread.h>
|
||||
|
||||
|
@ -16,5 +19,6 @@ public:
|
|||
private:
|
||||
pthread_mutex_t _lock;
|
||||
};
|
||||
#endif // CONFIG_HAL_BOARD
|
||||
|
||||
#endif // __AP_HAL_LINUX_SEMAPHORE_H__
|
||||
|
|
Loading…
Reference in New Issue