Mercury
|
#include "mercury_thread_mutex.h"
Go to the source code of this file.
Typedefs | |
typedef pthread_cond_t | hg_thread_cond_t |
Functions | |
HG_UTIL_EXPORT int | hg_thread_cond_init (hg_thread_cond_t *cond) |
Initialize the condition. More... | |
HG_UTIL_EXPORT int | hg_thread_cond_destroy (hg_thread_cond_t *cond) |
Destroy the condition. More... | |
HG_UTIL_EXPORT int | hg_thread_cond_signal (hg_thread_cond_t *cond) |
Wake one thread waiting for the condition to change. More... | |
HG_UTIL_EXPORT int | hg_thread_cond_broadcast (hg_thread_cond_t *cond) |
Wake all the threads waiting for the condition to change. More... | |
HG_UTIL_EXPORT int | hg_thread_cond_wait (hg_thread_cond_t *cond, hg_thread_mutex_t *mutex) |
Wait for the condition to change. More... | |
HG_UTIL_EXPORT int | hg_thread_cond_timedwait (hg_thread_cond_t *cond, hg_thread_mutex_t *mutex, unsigned int timeout) |
Wait timeout ms for the condition to change. More... | |
typedef pthread_cond_t hg_thread_cond_t |
Definition at line 19 of file mercury_thread_condition.h.
HG_UTIL_EXPORT int hg_thread_cond_init | ( | hg_thread_cond_t * | cond | ) |
Initialize the condition.
cond | [IN/OUT] pointer to condition object |
HG_UTIL_EXPORT int hg_thread_cond_destroy | ( | hg_thread_cond_t * | cond | ) |
Destroy the condition.
cond | [IN/OUT] pointer to condition object |
HG_UTIL_EXPORT int hg_thread_cond_signal | ( | hg_thread_cond_t * | cond | ) |
Wake one thread waiting for the condition to change.
cond | [IN/OUT] pointer to condition object |
HG_UTIL_EXPORT int hg_thread_cond_broadcast | ( | hg_thread_cond_t * | cond | ) |
Wake all the threads waiting for the condition to change.
cond | [IN/OUT] pointer to condition object |
HG_UTIL_EXPORT int hg_thread_cond_wait | ( | hg_thread_cond_t * | cond, |
hg_thread_mutex_t * | mutex | ||
) |
Wait for the condition to change.
cond | [IN/OUT] pointer to condition object |
mutex | [IN/OUT] pointer to mutex object |
HG_UTIL_EXPORT int hg_thread_cond_timedwait | ( | hg_thread_cond_t * | cond, |
hg_thread_mutex_t * | mutex, | ||
unsigned int | timeout | ||
) |
Wait timeout ms for the condition to change.
cond | [IN/OUT] pointer to condition object |
mutex | [IN/OUT] pointer to mutex object |
timeout | [IN] timeout (in milliseconds) |