mutex.h File Reference

Thread subsystem III. More...

#include <gctypes.h>

Defines

#define LWP_MUTEX_NULL   0xffffffff

Typedefs

typedef u32 mutex_t
 typedef for the mutex handle

Functions

s32 LWP_MutexInit (mutex_t *mutex, boolean use_recursive)
 Initializes a mutex lock.
s32 LWP_MutexDestroy (mutex_t mutex)
 Close mutex lock, release all threads and handles locked on this mutex.
s32 LWP_MutexLock (mutex_t mutex)
 Enter the mutex lock.
s32 LWP_MutexTryLock (mutex_t mutex)
 Try to enter the mutex lock.
s32 LWP_MutexUnlock (mutex_t mutex)
 Release the mutex lock and let other threads process further on this mutex.


Detailed Description

Thread subsystem III.


Function Documentation

s32 LWP_MutexDestroy ( mutex_t  mutex  ) 

Close mutex lock, release all threads and handles locked on this mutex.

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

s32 LWP_MutexInit ( mutex_t mutex,
boolean  use_recursive 
)

Initializes a mutex lock.

Parameters:
[out] mutex pointer to a mutex_t handle.
[in] use_recursive whether to allow the thread, whithin the same context, to enter multiple times the lock or not.
Returns:
0 on success, <0 on error

s32 LWP_MutexLock ( mutex_t  mutex  ) 

Enter the mutex lock.

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

s32 LWP_MutexTryLock ( mutex_t  mutex  ) 

Try to enter the mutex lock.

Parameters:
[in] mutex handle to the mutex_t structure.
Returns:
0: on first aquire, 1: would lock

s32 LWP_MutexUnlock ( mutex_t  mutex  ) 

Release the mutex lock and let other threads process further on this mutex.

Parameters:
[in] mutex handle to the mutex_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