fsfw/osal/linux/Mutex.h

23 lines
403 B
C
Raw Normal View History

2020-05-29 00:47:54 +02:00
#ifndef OS_LINUX_MUTEX_H_
#define OS_LINUX_MUTEX_H_
2018-07-13 18:28:26 +02:00
#include <framework/ipc/MutexIF.h>
2020-05-27 11:41:36 +02:00
extern "C" {
2018-07-13 18:28:26 +02:00
#include <pthread.h>
2020-05-27 11:41:36 +02:00
}
2018-07-13 18:28:26 +02:00
class Mutex : public MutexIF {
public:
Mutex();
virtual ~Mutex();
2020-08-07 20:36:37 +02:00
virtual ReturnValue_t lockMutex(TimeoutType timeoutType, uint32_t timeoutMs);
2018-07-13 18:28:26 +02:00
virtual ReturnValue_t unlockMutex();
private:
pthread_mutex_t mutex;
static uint8_t count;
};
#endif /* OS_RTEMS_MUTEX_H_ */