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,12 +53,14 @@ ReturnValue_t InternalErrorReporter::performOperation(uint8_t opCode) {
} }
#endif #endif
PoolReadGuard readGuard(&internalErrorDataset); {
if(readGuard.getReadResult() == HasReturnvaluesIF::RETURN_OK) { PoolReadGuard readGuard(&internalErrorDataset);
internalErrorDataset.queueHits.value += newQueueHits; if(readGuard.getReadResult() == HasReturnvaluesIF::RETURN_OK) {
internalErrorDataset.storeHits.value += newStoreHits; internalErrorDataset.queueHits.value += newQueueHits;
internalErrorDataset.tmHits.value += newTmHits; internalErrorDataset.storeHits.value += newStoreHits;
internalErrorDataset.setValidity(true, true); internalErrorDataset.tmHits.value += newTmHits;
internalErrorDataset.setValidity(true, true);
}
} }
poolManager.performHkOperation(); poolManager.performHkOperation();