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
PoolReadGuard readGuard(&internalErrorDataset);
if(readGuard.getReadResult() == HasReturnvaluesIF::RETURN_OK) {
internalErrorDataset.queueHits.value += newQueueHits;
internalErrorDataset.storeHits.value += newStoreHits;
internalErrorDataset.tmHits.value += newTmHits;
internalErrorDataset.setValidity(true, true);
{
PoolReadGuard readGuard(&internalErrorDataset);
if(readGuard.getReadResult() == HasReturnvaluesIF::RETURN_OK) {
internalErrorDataset.queueHits.value += newQueueHits;
internalErrorDataset.storeHits.value += newStoreHits;
internalErrorDataset.tmHits.value += newTmHits;
internalErrorDataset.setValidity(true, true);
}
}
poolManager.performHkOperation();