HTL_thread_mutex_destroy
Destroys a mutex.
Interface Definition
int HTL_thread_mutex_destroy(HTL_thread_mutex_t *thread_mutex);
Description
HTL_thread_mutex_destroy() destroys the mutex resource thread_mutex and sets thread_mutex to HTL_THREAD_MUTEX_NULL.
This function destroys the mutex regardless of whether thread_mutex is locked.
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
thread_mutex |
HTL_thread_mutex_t * |
Address of the handle to the mutex. |
Input/Output |
Return Value
- HTL_THREAD_SUCCESS: success.
- Other values: failure. For details, see the error code descriptions.
Example
HTL_thread_mutex_t mutex;
int ret;
ret = HTL_thread_mutex_destroy(&mutex);
if ( ret != HTL_THREAD_SUCCESS) return;
Parent topic: Mutex Functions