2020-06-08 14:11:38 +02:00
|
|
|
#ifndef FRAMEWORK_OSAL_RTEMS_MUTEX_H_
|
|
|
|
#define FRAMEWORK_OSAL_RTEMS_MUTEX_H_
|
2018-07-12 16:29:32 +02:00
|
|
|
|
2020-08-13 20:53:35 +02:00
|
|
|
#include "../../ipc/MutexIF.h"
|
2018-07-12 16:29:32 +02:00
|
|
|
#include "RtemsBasic.h"
|
|
|
|
|
|
|
|
class Mutex : public MutexIF {
|
|
|
|
public:
|
|
|
|
Mutex();
|
|
|
|
~Mutex();
|
2020-08-25 12:08:12 +02:00
|
|
|
ReturnValue_t lockMutex(TimeoutType timeoutType, uint32_t timeoutMs = 0);
|
2018-07-12 16:29:32 +02:00
|
|
|
ReturnValue_t unlockMutex();
|
|
|
|
private:
|
|
|
|
rtems_id mutexId;
|
|
|
|
static uint8_t count;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* OS_RTEMS_MUTEX_H_ */
|