action
container
contrib
controller
coordinates
datalinklayer
datapool
datapoollocal
defaultcfg
devicehandlers
doc
events
fdir
globalfunctions
health
housekeeping
internalError
ipc
logo
memory
modes
monitoring
objectmanager
osal
FreeRTOS
BinSemaphUsingTask.cpp
BinSemaphUsingTask.h
BinarySemaphore.cpp
BinarySemaphore.h
CMakeLists.txt
Clock.cpp
CountingSemaphUsingTask.cpp
CountingSemaphUsingTask.h
CountingSemaphore.cpp
CountingSemaphore.h
FixedTimeslotTask.cpp
FixedTimeslotTask.h
FreeRTOSTaskIF.h
MessageQueue.cpp
MessageQueue.h
Mutex.cpp
Mutex.h
MutexFactory.cpp
PeriodicTask.cpp
PeriodicTask.h
QueueFactory.cpp
README.md
SemaphoreFactory.cpp
TaskFactory.cpp
TaskManagement.cpp
TaskManagement.h
Timekeeper.cpp
Timekeeper.h
common
host
linux
rtems
windows
CMakeLists.txt
Endiness.h
InternalErrorCodes.h
parameters
power
pus
returnvalues
rmap
serialize
serviceinterface
storagemanager
subsystem
tasks
tcdistribution
thermal
timemanager
tmstorage
tmtcpacket
tmtcservices
unittest
.gitignore
.gitmodules
CHANGELOG
CMakeLists.txt
FSFWVersion.h
LICENSE
NOTICE
README.md
fsfw.mk
30 lines
690 B
C++
30 lines
690 B
C++
#ifndef FRAMEWORK_FREERTOS_MUTEX_H_
|
|
#define FRAMEWORK_FREERTOS_MUTEX_H_
|
|
|
|
#include "../../ipc/MutexIF.h"
|
|
|
|
#include <freertos/FreeRTOS.h>
|
|
#include <freertos/semphr.h>
|
|
|
|
/**
|
|
* @brief OS component to implement MUTual EXclusion
|
|
*
|
|
* @details
|
|
* Mutexes are binary semaphores which include a priority inheritance mechanism.
|
|
* Documentation: https://www.freertos.org/Real-time-embedded-RTOS-mutexes.html
|
|
* @ingroup osal
|
|
*/
|
|
class Mutex : public MutexIF {
|
|
public:
|
|
Mutex();
|
|
~Mutex();
|
|
ReturnValue_t lockMutex(TimeoutType timeoutType,
|
|
uint32_t timeoutMs) override;
|
|
ReturnValue_t unlockMutex() override;
|
|
|
|
private:
|
|
SemaphoreHandle_t handle;
|
|
};
|
|
|
|
#endif /* FRAMEWORK_FREERTOS_MUTEX_H_ */
|