Mstdlib-1.24.0
|
Typedefs | |
typedef struct M_thread_cond | M_thread_cond_t |
Enumerations | |
enum | M_thread_condattr_t { M_THREAD_CONDATTR_NONE = 0 } |
Functions | |
M_thread_cond_t * | M_thread_cond_create (M_uint32 attr) |
void | M_thread_cond_destroy (M_thread_cond_t *cond) |
M_bool | M_thread_cond_timedwait (M_thread_cond_t *cond, M_thread_mutex_t *mutex, M_uint64 millisec) |
M_bool | M_thread_cond_timedwait_abs (M_thread_cond_t *cond, M_thread_mutex_t *mutex, const M_timeval_t *abstime) |
M_bool | M_thread_cond_wait (M_thread_cond_t *cond, M_thread_mutex_t *mutex) |
void | M_thread_cond_broadcast (M_thread_cond_t *cond) |
void | M_thread_cond_signal (M_thread_cond_t *cond) |
Thread Conditionals
typedef struct M_thread_cond M_thread_cond_t |
enum M_thread_condattr_t |
M_thread_cond_t * M_thread_cond_create | ( | M_uint32 | attr | ) |
Conditional create.
[in] | attr | M_thread_condattr_t attributes which control how the conditional should behave. |
void M_thread_cond_destroy | ( | M_thread_cond_t * | cond | ) |
Destroy a conditional.
[in] | cond | The conditional. |
M_bool M_thread_cond_timedwait | ( | M_thread_cond_t * | cond, |
M_thread_mutex_t * | mutex, | ||
M_uint64 | millisec | ||
) |
Wait on conditional with a timeout of now + millisec.
[in] | cond | The conditional. |
[in,out] | mutex | The mutex to operate on. |
[in] | millisec | The amount of time wait from now in milliseconds. |
M_bool M_thread_cond_timedwait_abs | ( | M_thread_cond_t * | cond, |
M_thread_mutex_t * | mutex, | ||
const M_timeval_t * | abstime | ||
) |
Wait on conditional until a specified time.
[in] | cond | The conditional. |
[in,out] | mutex | The mutex to operate on. |
[in] | abstime | Time to wait until. |
M_bool M_thread_cond_wait | ( | M_thread_cond_t * | cond, |
M_thread_mutex_t * | mutex | ||
) |
Wait on conditional
Blocks the thread until the conditional is activated.
The mutex must be locked before calling this function. This will unlock the mutex and block on the conditional. When the conditional is activated the mutex will be locked.
[in] | cond | The conditional. |
[in,out] | mutex | The mutex to operate on. |
void M_thread_cond_broadcast | ( | M_thread_cond_t * | cond | ) |
Activate all waiting conditionals.
[in] | cond | The conditional. |
void M_thread_cond_signal | ( | M_thread_cond_t * | cond | ) |
Activate a waiting conditional (single).
[in] | cond | The conditional. |