mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-19 23:28:32 -04:00
81d77d4a70
* it now looks like a semaphore!
19 lines
357 B
C++
19 lines
357 B
C++
|
|
#ifndef __AP_HAL_SEMAPHORES_H__
|
|
#define __AP_HAL_SEMAPHORES_H__
|
|
|
|
#include <AP_HAL_Namespace.h>
|
|
|
|
#include <limits.h>
|
|
|
|
#define HAL_SEMAPHORE_BLOCK_FOREVER UINT32_MAX
|
|
|
|
class AP_HAL::Semaphore {
|
|
public:
|
|
virtual bool take(uint32_t timeout_ms) = 0;
|
|
virtual bool take_nonblocking() = 0;
|
|
virtual bool give() = 0;
|
|
};
|
|
|
|
#endif // __AP_HAL_SEMAPHORES_H__
|