ardupilot/libraries/AP_HAL/Semaphores.h
Andrew Tridgell e76c77e86a AP_HAL: mark semaphore take operations as WARN_IF_UNUSED
this prevents common bugs
2013-01-09 20:42:02 +11:00

17 lines
380 B
C++

#ifndef __AP_HAL_SEMAPHORES_H__
#define __AP_HAL_SEMAPHORES_H__
#include <AP_HAL_Namespace.h>
#define HAL_SEMAPHORE_BLOCK_FOREVER ((uint32_t) 0xFFFFFFFF)
class AP_HAL::Semaphore {
public:
virtual bool take(uint32_t timeout_ms) WARN_IF_UNUSED = 0 ;
virtual bool take_nonblocking() WARN_IF_UNUSED = 0;
virtual bool give() = 0;
};
#endif // __AP_HAL_SEMAPHORES_H__