CyberLink for C

ccond.c File Reference

#include <cybergarage/util/ccond.h>
#include <cybergarage/util/clog.h>
#include <sys/time.h>

Functions

CgCond * cg_cond_new ()
BOOL cg_cond_delete (CgCond *cond)
BOOL cg_cond_wait (CgCond *cond, CgMutex *mutex, unsigned long timeout)
BOOL cg_cond_signal (CgCond *cond)

Function Documentation

BOOL cg_cond_delete ( CgCond *  cond)

Destroy a condition variable

Parameters:
condThe cond to destroy
CgCond* cg_cond_new ( )

Create a new condition variable

BOOL cg_cond_signal ( CgCond *  cond)

Signal a condition variable

Parameters:
condCond to be signalled
BOOL cg_cond_wait ( CgCond *  cond,
CgMutex *  mutex,
unsigned long  timeout 
)

Wait for condition variable to be signalled.

Parameters:
condCond to be waited
mutexMutex used for synchronization
timeoutMaximum time in seconds to wait, 0 to wait forever