PS2SDK
PS2 Homebrew Libraries
thsemap.h File Reference
#include <types.h>
#include <irx.h>
+ Include dependency graph for thsemap.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  iop_sema_t
 
struct  iop_sema_info_t
 

Macros

#define SA_THFIFO   0x000
 
#define SA_THPRI   0x001
 
#define SA_IHTHPRI   0x100
 
#define IOP_MUTEX_LOCKED   0
 
#define IOP_MUTEX_UNLOCKED   1
 
#define thsemap_IMPORTS_start   DECLARE_IMPORT_TABLE(thsemap, 1, 2)
 
#define thsemap_IMPORTS_end   END_IMPORT_TABLE
 
#define I_CreateSema   DECLARE_IMPORT(4, CreateSema)
 
#define I_DeleteSema   DECLARE_IMPORT(5, DeleteSema)
 
#define I_SignalSema   DECLARE_IMPORT(6, SignalSema)
 
#define I_iSignalSema   DECLARE_IMPORT(7, iSignalSema)
 
#define I_WaitSema   DECLARE_IMPORT(8, WaitSema);
 
#define I_PollSema   DECLARE_IMPORT(9, PollSema);
 
#define I_ReferSemaStatus   DECLARE_IMPORT(11, ReferSemaStatus)
 
#define I_iReferSemaStatus   DECLARE_IMPORT(12, iReferSemaStatus)
 

Functions

int CreateSema (iop_sema_t *sema)
 
int DeleteSema (int semid)
 
int SignalSema (int semid)
 
int iSignalSema (int semid)
 
int WaitSema (int semid)
 
int PollSema (int semid)
 
int ReferSemaStatus (int semid, iop_sema_info_t *info)
 
int iReferSemaStatus (int semid, iop_sema_info_t *info)
 
static int CreateMutex (int state)
 

Detailed Description

Kernel-based semaphores.

Definition in file thsemap.h.


Data Structure Documentation

◆ iop_sema_t

struct iop_sema_t

Definition at line 38 of file thsemap.h.

Data Fields
u32 attr
u32 option
int initial
int max

◆ iop_sema_info_t

struct iop_sema_info_t

Definition at line 46 of file thsemap.h.

Data Fields
u32 attr
u32 option
int initial
int max
int current
int numWaitThreads
int reserved[2]