2020-11-17 19:35:37 +01:00
|
|
|
#ifndef FSFW_OSAL_RTEMS_MUTEX_H_
|
|
|
|
#define FSFW_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:
|
2021-01-27 18:15:54 +01:00
|
|
|
rtems_id mutexId = 0;
|
2018-07-12 16:29:32 +02:00
|
|
|
static uint8_t count;
|
|
|
|
};
|
|
|
|
|
2020-11-17 19:35:37 +01:00
|
|
|
#endif /* FSFW_OSAL_RTEMS_MUTEX_H_ */
|