RetroArch
Macros | Typedefs | Functions
mutex.h File Reference
#include <gctypes.h>
Include dependency graph for mutex.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LWP_MUTEX_NULL   0xffffffff
 

Typedefs

typedef u32 mutex_t
 

Functions

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

Macro Definition Documentation

◆ LWP_MUTEX_NULL

#define LWP_MUTEX_NULL   0xffffffff

Typedef Documentation

◆ mutex_t

typedef u32 mutex_t

Function Documentation

◆ LWP_MutexDestroy()

s32 LWP_MutexDestroy ( mutex_t  mutex)

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

Parameters
[in]mutexhandle to the mutex_t structure.
Returns
0 on success, <0 on error
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LWP_MutexInit()

s32 LWP_MutexInit ( mutex_t mutex,
bool  use_recursive 
)

Initializes a mutex lock.

Parameters
[out]mutexpointer to a mutex_t handle.
[in]use_recursivewhether to allow the thread, whithin the same context, to enter multiple times the lock or not.
Returns
0 on success, <0 on error
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LWP_MutexLock()

s32 LWP_MutexLock ( mutex_t  mutex)

Enter the mutex lock.

Parameters
[in]mutexhandle to the mutext_t structure.
Returns
0 on success, <0 on error
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LWP_MutexTryLock()

s32 LWP_MutexTryLock ( mutex_t  mutex)

Try to enter the mutex lock.

Parameters
[in]mutexhandle to the mutex_t structure.
Returns
0: on first aquire, 1: would lock
Here is the call graph for this function:

◆ LWP_MutexUnlock()

s32 LWP_MutexUnlock ( mutex_t  mutex)

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

Parameters
[in]mutexhandle to the mutex_t structure.
Returns
0 on success, <0 on error
Here is the call graph for this function:
Here is the caller graph for this function: