cyg_cond_init
Name: cyg_cond_init ( ) - initialize a condition variable
Synopsis:
void cyg_cond_init
(
  cyg_cond_t  *cond, /* condition variable to initialize */
  cyg_mutex_t *mutex /* associated mutex                 */
)
Description: This initializes a condition variable for use. Condition variables are a synchronization mechanism which allows one thread to signal multiple threads simultaneously.
Include: #include <cyg/kernel/kapi.h>
Returns: nothing.
See Also: cyg_cond_destroy

cyg_cond_destroy
Name: cyg_cond_destroy ( ) - destroy (invalidate) a condition variable
Synopsis:
void cyg_cond_destroy
(
  cyg_cond_t *cond /* condition variable to destroy (invalidate) */
)
Description: This destroys (invalidates) a condition variable. Be careful not to destroy a condition variable that other threads are waiting on or is otherwise in use. If you destroy a condition variable that is in use, you will risk deadlocking the system.
Include: #include <cyg/kernel/kapi.h>
Returns: nothing
See Also: cyg_cond_init

cyg_cond_wait
Name: cyg_cond_wait ( ) - wait on a condition variable
Synopsis:
cyg_bool_t cyg_cond_wait
(
  cyg_cond_t *cond /* condition variable to wait for */
)
Description: Wait on a condition variable.
Include: #include <cyg/kernel/kapi.h>
Returns: "true" if no error, "false" otherwise.
See Also: cyg_cond_signal, cyg_cond_broadcast, cyg_cond_timed_wait

cyg_cond_signal
Name: cyg_cond_signal ( ) - wake one thread waiting on a condition variable
Synopsis:
void cyg_cond_signal
(
  cyg_cond_t *cond /* condition variable to signal */
)
Description: This wakes a single thread waiting on a condition variable. If multiple threads are waiting on the condition variable the scheduler implementation determines which thread will wake first. Generally it is the thread with the highest priority.
Include: #include <cyg/kernel/kapi.h>
Returns: nothing
See Also: cyg_cond_wait, cyg_cond_broadcast, cyg_cond_timed_wait

cyg_cond_broadcast
Name: cyg_cond_broadcast ( ) - wake all threads waiting on a condition variable
Synopsis:
void cyg_cond_broadcast
(
  cyg_cond_t *cond /* condition variable to signal */
)
Description: This wakes all threads waiting on a condition variable.
Include: #include <cyg/kernel/kapi.h>
Returns: nothing
See Also: cyg_cond_wait, cyg_cond_signal, cyg_cond_timed_wait

cyg_cond_timed_wait
Name: cyg_cond_timed_wait ( ) - wake one thread on a condition variable with timeout
Synopsis:
cyg_bool_t cyg_cond_timed_wait
(
  cyg_cond_t       *cond,  /* condition variable to wait for */
  cyg_tick_count_t abstime /* absolute timeout               */
)
Description: This waits on a condition variable. If the system time goes beyond "abstime" the wait will timeout and an error is returned. You can get the current system time by calling cyg_current_time.
Include: #include <cyg/kernel/kapi.h>
Returns: "true" if no timeout, "false" otherwise
See Also: cyg_cond_wait, cyg_cond_signal, cyg_cond_broadcast