1
0
forked from fsfw/fsfw

implemented mutex if changes

This commit is contained in:
2020-08-07 22:10:58 +02:00
parent 9d90348175
commit 7b3fddfd42
4 changed files with 34 additions and 30 deletions

View File

@ -8,9 +8,10 @@ class MutexHelper {
public:
MutexHelper(MutexIF* mutex, uint32_t timeoutMs) :
internalMutex(mutex) {
ReturnValue_t status = mutex->lockMutex(timeoutMs);
ReturnValue_t status = mutex->lockMutex(MutexIF::TimeoutType::WAITING,
timeoutMs);
if(status == MutexIF::MUTEX_TIMEOUT) {
sif::error << "MutexHelper: Lock of mutex failed with timeout of"
sif::error << "MutexHelper: Lock of mutex failed with timeout of "
<< timeoutMs << " milliseconds!" << std::endl;
}
else if(status != HasReturnvaluesIF::RETURN_OK){