2016-02-17 21:25:23 -04:00
|
|
|
#pragma once
|
2012-12-14 21:55:38 -04:00
|
|
|
|
2015-08-11 03:28:43 -03:00
|
|
|
#include "AP_HAL_Empty.h"
|
2012-12-14 21:55:38 -04:00
|
|
|
|
2015-12-07 14:53:55 -04:00
|
|
|
class Empty::Semaphore : public AP_HAL::Semaphore {
|
2012-12-17 15:07:26 -04:00
|
|
|
public:
|
2020-10-12 03:06:42 -03:00
|
|
|
|
2018-11-07 06:59:10 -04:00
|
|
|
bool give() override;
|
|
|
|
bool take(uint32_t timeout_ms) override;
|
|
|
|
bool take_nonblocking() override;
|
2021-07-01 03:29:34 -03:00
|
|
|
bool check_owner() { return true; }
|
2012-12-17 15:07:26 -04:00
|
|
|
private:
|
2013-01-02 20:44:23 -04:00
|
|
|
bool _taken;
|
2012-12-14 21:55:38 -04:00
|
|
|
};
|