HTL_thread_cond_broadcast
Sends a condition variable signal to all waiting threads.
Interface Definition
int HTL_thread_cond_broadcast(HTL_thread_cond_t *thread_cond);
Description
HTL_thread_cond_broadcast() is used to send a condition variable signal to all waiting threads that are being blocked by the condition variable thread_cond. The caller does not need to hold the mutex associated with thread_cond. This function is invalid if no waiting thread is currently blocked on thread_cond.
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
thread_cond |
HTL_thread_cond_t * |
Address of the handle to the condition variable. |
Input |
Return Value
- HTL_THREAD_SUCCESS: success.
- Other values: failure. For details, see the error code descriptions.
Example
1 | ret = HTL_thread_cond_broadcast(&cond); |
Parent topic: Condition Variable Functions