mirror of https://github.com/ARMmbed/mbed-os.git
Change `Mutex::unlock()` function definition - void return value
This is done for consistency with the new version of `Mutex::lock()` member function which does not return status.pull/7423/head
parent
f65bba9a23
commit
c693eb512a
|
@ -108,10 +108,13 @@ bool Mutex::trylock_until(uint64_t millisec)
|
|||
}
|
||||
}
|
||||
|
||||
osStatus Mutex::unlock()
|
||||
void Mutex::unlock()
|
||||
{
|
||||
_count--;
|
||||
return osMutexRelease(_id);
|
||||
|
||||
osStatus status = osMutexRelease(_id);
|
||||
|
||||
MBED_ASSERT(status == osOK);
|
||||
}
|
||||
|
||||
osThreadId Mutex::get_owner()
|
||||
|
|
10
rtos/Mutex.h
10
rtos/Mutex.h
|
@ -135,16 +135,12 @@ public:
|
|||
*/
|
||||
bool trylock_until(uint64_t millisec);
|
||||
|
||||
/** Unlock the mutex that has previously been locked by the same thread
|
||||
@return status code that indicates the execution status of the function:
|
||||
@a osOK the mutex has been released.
|
||||
@a osErrorParameter internal error.
|
||||
@a osErrorResource the mutex was not locked or the current thread wasn't the owner.
|
||||
@a osErrorISR this function cannot be called from the interrupt service routine.
|
||||
/**
|
||||
Unlock the mutex that has previously been locked by the same thread
|
||||
|
||||
@note You cannot call this function from ISR context.
|
||||
*/
|
||||
osStatus unlock();
|
||||
void unlock();
|
||||
|
||||
/** Get the owner the this mutex
|
||||
@return the current owner of this mutex.
|
||||
|
|
Loading…
Reference in New Issue