1
0
forked from fsfw/fsfw

implemented new mutex interface

This commit is contained in:
2020-08-07 20:36:37 +02:00
parent 1a118fe215
commit bfecbfbd80
9 changed files with 47 additions and 35 deletions

View File

@ -8,7 +8,8 @@ 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 "
<< timeoutMs << " milliseconds!" << std::endl;