libOGC  1.0
 All Data Structures Files Functions Variables Typedefs Macros Modules Pages
Macros | Typedefs | Functions
cond.h File Reference

Thread subsystem V. More...

#include <gctypes.h>
#include <time.h>

Macros

#define LWP_COND_NULL   0xffffffff
 

Typedefs

typedef u32 cond_t
 typedef for the condition variable handle
 

Functions

s32 LWP_CondBroadcast (cond_t cond)
 Broadcast all threads waiting on this condition variable to wake up. More...
 
s32 LWP_CondDestroy (cond_t cond)
 Destroy condition variable, release all threads and handles blocked on that condition variable. More...
 
s32 LWP_CondInit (cond_t *cond)
 Initialize condition variable. More...
 
s32 LWP_CondSignal (cond_t cond)
 Signal a specific thread waiting on this condition variable to wake up. More...
 
s32 LWP_CondTimedWait (cond_t cond, mutex_t mutex, const struct timespec *abstime)
 Timed wait on a conditionvariable. More...
 
s32 LWP_CondWait (cond_t cond, mutex_t mutex)
 Wait on condition variable. More...
 

Detailed Description

Thread subsystem V.

Function Documentation

s32 LWP_CondBroadcast ( cond_t  cond)

Broadcast all threads waiting on this condition variable to wake up.

Parameters
[in]condhandle to the cond_t structure
Returns
0 on success, <0 on error
s32 LWP_CondDestroy ( cond_t  cond)

Destroy condition variable, release all threads and handles blocked on that condition variable.

Parameters
[in]condhandle to the cond_t structure
Returns
0 on success, <0 on error
s32 LWP_CondInit ( cond_t cond)

Initialize condition variable.

Parameters
[out]condpointer to the cond_t handle
Returns
0 on success, <0 on error
s32 LWP_CondSignal ( cond_t  cond)

Signal a specific thread waiting on this condition variable to wake up.

Parameters
[in]condhandle to the cond_t structure
Returns
0 on success, <0 on error
s32 LWP_CondTimedWait ( cond_t  cond,
mutex_t  mutex,
const struct timespec *  abstime 
)

Timed wait on a conditionvariable.

Parameters
[in]condhandle to the cond_t structure
[in]mutexhandle to the mutex_t structure
[in]abstimepointer to a timespec structure holding the abs time for the timeout.
Returns
0 on success, <0 on error
s32 LWP_CondWait ( cond_t  cond,
mutex_t  mutex 
)

Wait on condition variable.

Parameters
[in]condhandle to the cond_t structure
[in]mutexhandle to the mutex_t structure
Returns
0 on success, <0 on error