mUPnP for C
cond.h File Reference
#include <mupnp/typedef.h>
#include <mupnp/util/mutex.h>
#include <pthread.h>

Data Structures

struct  _mUpnpCond
 The generic wrapper struct for mUPnP's conds. More...
 

Typedefs

typedef struct _mUpnpCond mUpnpCond
 The generic wrapper struct for mUPnP's conds.
 

Functions

mUpnpCondmupnp_cond_new (void)
 
bool mupnp_cond_delete (mUpnpCond *cond)
 
bool mupnp_cond_wait (mUpnpCond *cond, mUpnpMutex *mutex, unsigned long timeout)
 
bool mupnp_cond_signal (mUpnpCond *cond)
 

Typedef Documentation

◆ mUpnpCond

typedef struct _mUpnpCond mUpnpCond

The generic wrapper struct for mUPnP's conds.

This wrapper has been created to enable 100% code compatibility for different platforms (Linux, Win32 etc..)

Function Documentation

◆ mupnp_cond_delete()

bool mupnp_cond_delete ( mUpnpCond * cond)

Destroy a condition variable

Parameters
condThe cond to destroy

◆ mupnp_cond_new()

mUpnpCond * mupnp_cond_new ( void )

Create a new condition variable

◆ mupnp_cond_signal()

bool mupnp_cond_signal ( mUpnpCond * cond)

Signal a condition variable

Parameters
condCond to be signalled

◆ mupnp_cond_wait()

bool mupnp_cond_wait ( mUpnpCond * cond,
mUpnpMutex * 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