perform renaming
This commit is contained in:
@ -7,15 +7,15 @@ Mutex::Mutex() {}
|
||||
ReturnValue_t Mutex::lockMutex(TimeoutType timeoutType, uint32_t timeoutMs) {
|
||||
if (timeoutType == TimeoutType::BLOCKING) {
|
||||
mutex.lock();
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
} else if (timeoutType == TimeoutType::POLLING) {
|
||||
if (mutex.try_lock()) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
} else if (timeoutType == TimeoutType::WAITING) {
|
||||
auto chronoMs = std::chrono::milliseconds(timeoutMs);
|
||||
if (mutex.try_lock_for(chronoMs)) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
}
|
||||
return MutexIF::MUTEX_TIMEOUT;
|
||||
@ -23,7 +23,7 @@ ReturnValue_t Mutex::lockMutex(TimeoutType timeoutType, uint32_t timeoutMs) {
|
||||
|
||||
ReturnValue_t Mutex::unlockMutex() {
|
||||
mutex.unlock();
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
std::timed_mutex* Mutex::getMutexHandle() { return &mutex; }
|
||||
|
Reference in New Issue
Block a user