Semaphores.h 274 B

12345678910111213
  1. #pragma once
  2. #include "AP_HAL_Empty.h"
  3. class Empty::Semaphore : public AP_HAL::Semaphore {
  4. public:
  5. Semaphore() : _taken(false) {}
  6. bool give() override;
  7. bool take(uint32_t timeout_ms) override;
  8. bool take_nonblocking() override;
  9. private:
  10. bool _taken;
  11. };