2021-07-13 20:58:45 +02:00
|
|
|
#include "fsfw/ipc/MutexFactory.h"
|
2020-12-14 21:46:33 +01:00
|
|
|
|
2022-02-02 10:29:30 +01:00
|
|
|
#include "fsfw/osal/linux/Mutex.h"
|
|
|
|
|
|
|
|
// TODO: Different variant than the lazy loading in QueueFactory. What's better and why?
|
2018-07-13 18:28:26 +02:00
|
|
|
MutexFactory* MutexFactory::factoryInstance = new MutexFactory();
|
|
|
|
|
2022-02-02 10:29:30 +01:00
|
|
|
MutexFactory::MutexFactory() {}
|
2018-07-13 18:28:26 +02:00
|
|
|
|
2022-02-02 10:29:30 +01:00
|
|
|
MutexFactory::~MutexFactory() {}
|
2018-07-13 18:28:26 +02:00
|
|
|
|
2022-02-02 10:29:30 +01:00
|
|
|
MutexFactory* MutexFactory::instance() { return MutexFactory::factoryInstance; }
|
2018-07-13 18:28:26 +02:00
|
|
|
|
2022-02-02 10:29:30 +01:00
|
|
|
MutexIF* MutexFactory::createMutex() { return new Mutex(); }
|
2018-07-13 18:28:26 +02:00
|
|
|
|
2022-02-02 10:29:30 +01:00
|
|
|
void MutexFactory::deleteMutex(MutexIF* mutex) { delete mutex; }
|