HAL_Linux: implement new_semaphore()

This commit is contained in:
Andrew Tridgell 2015-12-17 08:24:11 +11:00
parent 02bee8810d
commit c77e3c89c5
1 changed files with 4 additions and 0 deletions

View File

@ -7,6 +7,7 @@
#include "AP_HAL_Linux_Namespace.h" #include "AP_HAL_Linux_Namespace.h"
#include "ToneAlarmDriver.h" #include "ToneAlarmDriver.h"
#include "Semaphores.h"
class Linux::Util : public AP_HAL::Util { class Linux::Util : public AP_HAL::Util {
public: public:
@ -61,6 +62,9 @@ public:
void perf_end(perf_counter_t perf) override; void perf_end(perf_counter_t perf) override;
void perf_count(perf_counter_t perf) override; void perf_count(perf_counter_t perf) override;
// create a new semaphore
AP_HAL::Semaphore *new_semaphore(void) override { return new Linux::Semaphore; }
private: private:
static Linux::ToneAlarm _toneAlarm; static Linux::ToneAlarm _toneAlarm;
Linux::Heat *_heat; Linux::Heat *_heat;