APM:Libraries
Semaphores.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "AP_HAL_Namespace.h"
4 
5 #define HAL_SEMAPHORE_BLOCK_FOREVER 0
6 
8 public:
9  virtual bool take(uint32_t timeout_ms) WARN_IF_UNUSED = 0 ;
10  virtual bool take_nonblocking() WARN_IF_UNUSED = 0;
11 
12  // a varient that blocks forever
13  #pragma GCC diagnostic push
14  #pragma GCC diagnostic ignored "-Wunused-result"
16  #pragma GCC diagnostic pop
17 
18  virtual bool give() = 0;
19  virtual ~Semaphore(void) {}
20 };
virtual ~Semaphore(void)
Definition: Semaphores.h:19
#define HAL_SEMAPHORE_BLOCK_FOREVER
Definition: Semaphores.h:5
virtual bool take(uint32_t timeout_ms) WARN_IF_UNUSED=0
virtual bool take_nonblocking() WARN_IF_UNUSED=0
virtual bool give()=0
virtual void take_blocking()
Definition: Semaphores.h:15
#define WARN_IF_UNUSED
Definition: AP_HAL_Macros.h:10