HTL_thread_rwlock_destroy
Destroys the RW lock.
Interface Definition
int HTL_thread_rwlock_destroy(HTL_thread_rwlock_t *thread_rwlock);
Description
HTL_thread_rwlock_destroy() is used to destroy the resource of the RW lock thread_rwlock and set thread_rwlock to HTL_THREAD_RWLOCK_NULL.
This function destroys the resource regardless of whether the RW lock is locked.
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
thread_rwlock |
HTL_thread_rwlock_t * |
Address of the handle to the RW lock. |
Input/Output |
Return Value
- HTL_THREAD_SUCCESS: success.
- Other values: failure. For details, see the error code descriptions.
Example
1 2 3 | HTL_thread_rwlock_t rwlock; ret = HTL_thread_rwlock_init(&rwlock, NULL); ret = HTL_thread_rwlock_destroy(&rwlock); |
Parent topic: RW Lock Functions