condition_variable.h
Overview
The condition_variable.h file declares the condition variable interfaces in C.
Since: 10
Related module: FFRT
Summary
Functions
Name | Description |
---|---|
FFRT_C_API int ffrt_cond_init (ffrt_cond_t *cond, const ffrt_condattr_t *attr) | Initializes a condition variable. |
FFRT_C_API int ffrt_cond_signal (ffrt_cond_t *cond) | Unblocks at least one of the threads that are blocked on a condition variable. |
FFRT_C_API int ffrt_cond_broadcast (ffrt_cond_t *cond) | Unblocks all threads currently blocked on a condition variable. |
FFRT_C_API int ffrt_cond_wait (ffrt_cond_t *cond, ffrt_mutex_t *mutex) | Blocks the calling thread on a condition variable. |
FFRT_C_API int ffrt_cond_timedwait (ffrt_cond_t *cond, ffrt_mutex_t *mutex, const struct timespec *time_point) | Blocks the calling thread on a condition variable for a given duration. |
FFRT_C_API int ffrt_cond_destroy (ffrt_cond_t *cond) | Destroys a condition variable. |