pool read guard in scope

This commit is contained in:
Robin Müller 2021-03-23 14:28:01 +01:00
parent a5f44b8580
commit bdd9889718

View File

@ -53,6 +53,7 @@ ReturnValue_t InternalErrorReporter::performOperation(uint8_t opCode) {
} }
#endif #endif
{
PoolReadGuard readGuard(&internalErrorDataset); PoolReadGuard readGuard(&internalErrorDataset);
if(readGuard.getReadResult() == HasReturnvaluesIF::RETURN_OK) { if(readGuard.getReadResult() == HasReturnvaluesIF::RETURN_OK) {
internalErrorDataset.queueHits.value += newQueueHits; internalErrorDataset.queueHits.value += newQueueHits;
@ -60,6 +61,7 @@ ReturnValue_t InternalErrorReporter::performOperation(uint8_t opCode) {
internalErrorDataset.tmHits.value += newTmHits; internalErrorDataset.tmHits.value += newTmHits;
internalErrorDataset.setValidity(true, true); internalErrorDataset.setValidity(true, true);
} }
}
poolManager.performHkOperation(); poolManager.performHkOperation();
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;