mutex bugfix for host
This commit is contained in:
parent
37196c8e3b
commit
a92f6c5d8e
@ -4,12 +4,12 @@
|
|||||||
Mutex::Mutex() {}
|
Mutex::Mutex() {}
|
||||||
|
|
||||||
ReturnValue_t Mutex::lockMutex(TimeoutType timeoutType, uint32_t timeoutMs) {
|
ReturnValue_t Mutex::lockMutex(TimeoutType timeoutType, uint32_t timeoutMs) {
|
||||||
if(timeoutMs == MutexIF::BLOCKING) {
|
if(timeoutType == MutexIF::BLOCKING) {
|
||||||
mutex.lock();
|
mutex.lock();
|
||||||
locked = true;
|
locked = true;
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
}
|
}
|
||||||
else if(timeoutMs == MutexIF::POLLING) {
|
else if(timeoutType == MutexIF::POLLING) {
|
||||||
if(mutex.try_lock()) {
|
if(mutex.try_lock()) {
|
||||||
locked = true;
|
locked = true;
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user