2016-02-17 21:25:25 -04:00
|
|
|
#pragma once
|
2012-11-28 21:53:15 -04:00
|
|
|
|
2015-08-11 03:28:43 -03:00
|
|
|
#include "AP_HAL_Namespace.h"
|
2012-11-28 21:53:15 -04:00
|
|
|
|
2016-11-03 07:32:09 -03:00
|
|
|
#define HAL_SEMAPHORE_BLOCK_FOREVER 0
|
2012-11-28 21:53:15 -04:00
|
|
|
|
2013-01-02 20:27:01 -04:00
|
|
|
class AP_HAL::Semaphore {
|
|
|
|
public:
|
2013-01-09 05:42:02 -04:00
|
|
|
virtual bool take(uint32_t timeout_ms) WARN_IF_UNUSED = 0 ;
|
|
|
|
virtual bool take_nonblocking() WARN_IF_UNUSED = 0;
|
2013-01-02 20:27:01 -04:00
|
|
|
virtual bool give() = 0;
|
2012-11-28 21:53:15 -04:00
|
|
|
};
|