fsfw/osal/linux/MutexFactory.cpp

25 lines
493 B
C++
Raw Normal View History

2020-08-13 20:53:35 +02:00
#include "Mutex.h"
2018-07-13 18:28:26 +02:00
2020-12-14 21:46:33 +01:00
#include "../../ipc/MutexFactory.h"
2018-07-13 18:28:26 +02:00
//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;
}