semaphore.h File Reference

Thread subsystem IV. More...

#include <gctypes.h>

Defines

#define LWP_SEM_NULL   0xffffffff

Typedefs

typedef u32 sem_t
 typedef for the semaphore handle

Functions

s32 LWP_SemInit (sem_t *sem, u32 start, u32 max)
 Initializes a semaphore.
s32 LWP_SemDestroy (sem_t sem)
 Close and destroy a semaphore, release all threads and handles locked on this semaphore.
s32 LWP_SemWait (sem_t sem)
 Count down semaphore counter and enter lock if counter <=0.
s32 LWP_SemPost (sem_t sem)
 Count up semaphore counter and release lock if counter >0.


Detailed Description

Thread subsystem IV.


Function Documentation

s32 LWP_SemDestroy ( sem_t  sem  ) 

Close and destroy a semaphore, release all threads and handles locked on this semaphore.

Parameters:
[in] sem handle to the sem_t structure.
Returns:
0 on success, <0 on error

s32 LWP_SemInit ( sem_t sem,
u32  start,
u32  max 
)

Initializes a semaphore.

Parameters:
[out] sem pointer to a sem_t handle.
[in] start start count of the semaphore
[in] max maximum count of the semaphore
Returns:
0 on success, <0 on error

s32 LWP_SemPost ( sem_t  sem  ) 

Count up semaphore counter and release lock if counter >0.

Parameters:
[in] sem handle to the sem_t structure.
Returns:
0 on success, <0 on error

s32 LWP_SemWait ( sem_t  sem  ) 

Count down semaphore counter and enter lock if counter <=0.

Parameters:
[in] sem handle to the sem_t structure.
Returns:
0 on success, <0 on error


Generated on Sun Feb 4 18:14:34 2007 for libOGC by  doxygen 1.4.7