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

Go to the source code of this file.

Macros

#define LWP_SEM_NULL   0xffffffff
 

Typedefs

typedef u32 sem_t
 

Functions

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

Macro Definition Documentation

◆ LWP_SEM_NULL

#define LWP_SEM_NULL   0xffffffff

Typedef Documentation

◆ sem_t

typedef u32 sem_t

Function Documentation

◆ LWP_SemDestroy()

s32 LWP_SemDestroy ( sem_t  sem)

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

Parameters
[in]semhandle to the sem_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_SemInit()

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

Initializes a semaphore.

Parameters
[out]sempointer to a sem_t handle.
[in]startstart count of the semaphore
[in]maxmaximum count of the semaphore
Returns
0 on success, <0 on error
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LWP_SemPost()

s32 LWP_SemPost ( sem_t  sem)

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

Parameters
[in]semhandle to the sem_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_SemWait()

s32 LWP_SemWait ( sem_t  sem)

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

Parameters
[in]semhandle to the sem_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: