WIP: somethings wrong.. #19
@ -6,9 +6,10 @@
|
|||||||
|
|
||||||
class MutexHelper {
|
class MutexHelper {
|
||||||
public:
|
public:
|
||||||
MutexHelper(MutexIF* mutex, uint32_t timeoutMs) :
|
MutexHelper(MutexIF* mutex, MutexIF::TimeoutType timeoutType =
|
||||||
|
MutexIF::TimeoutType::BLOCKING, uint32_t timeoutMs) :
|
||||||
internalMutex(mutex) {
|
internalMutex(mutex) {
|
||||||
ReturnValue_t status = mutex->lockMutex(MutexIF::TimeoutType::WAITING,
|
ReturnValue_t status = mutex->lockMutex(timeoutType,
|
||||||
timeoutMs);
|
timeoutMs);
|
||||||
if(status == MutexIF::MUTEX_TIMEOUT) {
|
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 "
|
||||||
|
Loading…
Reference in New Issue
Block a user