1.4.4.12 OSAL_MUTEX_Unlock Function

C

OSAL_RESULT OSAL_MUTEX_Unlock(OSAL_MUTEX_HANDLE_TYPE* mutexID)

Summary

Unlocks a mutex.

Description

This function unlocks a previously obtained mutex.

Precondition

Mutex must have been created.

Parameters

ParamDescription
mutexIDPointer to the mutex handle

Returns

OSAL_RESULT_TRUE - Mutex released

OSAL_RESULT_FALSE - Mutex failed to be released or error occurred

Example

...
if (OSAL_MUTEX_Lock(&mutexData, 1000) == OSAL_RESULT_TRUE)
{
    // manipulate the shared data
    ...
    
    // unlock the mutex
    OSAL_MUTEX_Unlock(&mutexData);
}

Remarks

None.