action
container
contrib
controller
coordinates
datalinklayer
datapool
devicehandlers
events
fdir
globalfunctions
health
internalError
ipc
memory
modes
monitoring
objectmanager
osal
FreeRTOS
host
linux
BinarySemaphore.cpp
BinarySemaphore.h
Clock.cpp
CountingSemaphore.cpp
CountingSemaphore.h
FixedTimeslotTask.cpp
FixedTimeslotTask.h
InternalErrorCodes.cpp
MessageQueue.cpp
MessageQueue.h
Mutex.cpp
Mutex.h
MutexFactory.cpp
PeriodicPosixTask.cpp
PeriodicPosixTask.h
PosixThread.cpp
PosixThread.h
QueueFactory.cpp
SemaphoreFactory.cpp
TaskFactory.cpp
TcUnixUdpPollingTask.cpp
TcUnixUdpPollingTask.h
Timer.cpp
Timer.h
TmTcUnixUdpBridge.cpp
TmTcUnixUdpBridge.h
rtems
Endiness.h
InternalErrorCodes.h
parameters
power
pus
returnvalues
rmap
serialize
serviceinterface
storagemanager
subsystem
tasks
tcdistribution
thermal
timemanager
tmstorage
tmtcpacket
tmtcservices
unittest
.gitignore
.gitmodules
LICENSE
NOTICE
fsfw.mk
24 lines
492 B
C++
24 lines
492 B
C++
#include "../../ipc/MutexFactory.h"
|
|
#include "Mutex.h"
|
|
|
|
//TODO: Different variant than the lazy loading in QueueFactory. What's better and why?
|
|
MutexFactory* MutexFactory::factoryInstance = new MutexFactory();
|
|
|
|
MutexFactory::MutexFactory() {
|
|
}
|
|
|
|
MutexFactory::~MutexFactory() {
|
|
}
|
|
|
|
MutexFactory* MutexFactory::instance() {
|
|
return MutexFactory::factoryInstance;
|
|
}
|
|
|
|
MutexIF* MutexFactory::createMutex() {
|
|
return new Mutex();
|
|
}
|
|
|
|
void MutexFactory::deleteMutex(MutexIF* mutex) {
|
|
delete mutex;
|
|
}
|