cond_signal

Signals on the condition variable.

Library:LibC
Classification:UNIX International
Service:Synchronization

Syntax

  #include <synch.h>
   
  int  cond_signal  (
     cond_t   *cvp );
  

Parameters

cvp

(IN) Points to the condition variable to signal.

Return Values

Returns 0. No error conditions have been defined.

Remarks

The cond_signal function wakes up one of the threads blocked on the condition variable. If more than one thread is blocked on the condition variable, no assumptions can be made on which of those threads might be awakened. The cond_signal function has no effect on threads that are not awakened.

NOTE:Condition variables are stateless. If no threads are blocked on the condition variable, the call to cond_signal has no effect and is not remembered. A subsequent call to cond_wait or cond_timedwait blocks the calling thread.

See Also