read commit IF functions protected again

This commit is contained in:
Robin Müller 2021-02-28 14:41:43 +01:00
parent fb5a1b93fc
commit 68415853b5
2 changed files with 5 additions and 2 deletions

View File

@ -93,6 +93,7 @@ ReturnValue_t PoolDataSetBase::readVariable(uint16_t count) {
mutexTimeoutForSingleVars);
}
else {
/* The readWithoutLock function is protected, so we use the attorney here */
result = ReadCommitIFAttorney::readWithoutLock(registeredVariables[count]);
}
@ -125,6 +126,7 @@ void PoolDataSetBase::handleAlreadyReadDatasetCommit(
mutexTimeoutForSingleVars);
}
else {
/* The commitWithoutLock function is protected, so we use the attorney here */
ReadCommitIFAttorney::commitWithoutLock(registeredVariables[count]);
}
}
@ -145,7 +147,8 @@ ReturnValue_t PoolDataSetBase::handleUnreadDatasetCommit(
mutexTimeoutForSingleVars);
}
else {
result = registeredVariables[count]->commitWithoutLock();
/* The commitWithoutLock function is protected, so we use the attorney here */
ReadCommitIFAttorney::commitWithoutLock(registeredVariables[count]);
}
} else if (registeredVariables[count]->getDataPoolId()

View File

@ -17,7 +17,7 @@ public:
virtual ReturnValue_t commit(MutexIF::TimeoutType timeoutType,
uint32_t timeoutMs) = 0;
public:
protected:
/* Optional and protected because this is interesting for classes grouping members with commit
and read semantics where the lock is only necessary once. */