Ardupilot2/libraries/AP_HAL_SMACCM/Semaphore.h
James Bielman a4af314b57 Add AP_HAL_SMACCM implementation.
- Add a board definition for SMACCMPilot.
- Support the SMACCM HAL in required utility libraries.
2013-01-03 13:48:06 -08:00

23 lines
611 B
C++

#ifndef __AP_HAL_SMACCM_SEMAPHORE_H__
#define __AP_HAL_SMACCM_SEMAPHORE_H__
#include <AP_HAL_SMACCM.h>
class SMACCM::SMACCMSemaphore : public AP_HAL::Semaphore {
public:
SMACCMSemaphore();
// get - to claim ownership of the semaphore
bool get(void* owner);
// release - to give up ownership of the semaphore
bool release(void* owner);
// call_on_release - returns true if caller successfully added to the
// queue to be called back
bool call_on_release(void* caller, AP_HAL::Proc k);
private:
void* _owner;
AP_HAL::Proc _k;
};
#endif // __AP_HAL_SMACCM_SEMAPHORE_H__