mutex bugfix for host

This commit is contained in:
Robin Müller 2020-12-02 00:05:54 +01:00
parent 37196c8e3b
commit a92f6c5d8e

View File

@ -4,12 +4,12 @@
Mutex::Mutex() {}
ReturnValue_t Mutex::lockMutex(TimeoutType timeoutType, uint32_t timeoutMs) {
if(timeoutMs == MutexIF::BLOCKING) {
if(timeoutType == MutexIF::BLOCKING) {
mutex.lock();
locked = true;
return HasReturnvaluesIF::RETURN_OK;
}
else if(timeoutMs == MutexIF::POLLING) {
else if(timeoutType == MutexIF::POLLING) {
if(mutex.try_lock()) {
locked = true;
return HasReturnvaluesIF::RETURN_OK;