fsfw/datapoollocal/SharedLocalDataSet.cpp

17 lines
589 B
C++
Raw Normal View History

#include "SharedLocalDataSet.h"
2020-07-14 15:45:03 +02:00
2020-08-23 22:33:22 +02:00
SharedLocalDataSet::SharedLocalDataSet(object_id_t objectId, sid_t sid,
2020-07-14 15:45:03 +02:00
const size_t maxSize): SystemObject(objectId),
2020-08-23 22:33:22 +02:00
LocalPoolDataSetBase(sid, nullptr, maxSize) {
2020-07-14 15:45:03 +02:00
this->setContainer(poolVarVector.data());
datasetLock = MutexFactory::instance()->createMutex();
}
ReturnValue_t SharedLocalDataSet::lockDataset(dur_millis_t mutexTimeout) {
2020-08-08 12:49:20 +02:00
return datasetLock->lockMutex(MutexIF::TimeoutType::WAITING, mutexTimeout);
2020-07-14 15:45:03 +02:00
}
ReturnValue_t SharedLocalDataSet::unlockDataset() {
return datasetLock->unlockMutex();
}