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

Go to the source code of this file.

Data Structures

struct  iop_event_t
 
struct  iop_event_info_t
 

Macros

#define WEF_AND   0
 
#define WEF_OR   1
 
#define WEF_CLEAR   0x10
 
#define EA_SINGLE   0
 
#define EA_MULTI   2
 
#define thevent_IMPORTS
 
#define thevent_IMPORTS_start   DECLARE_IMPORT_TABLE(thevent, 1, 1)
 
#define thevent_IMPORTS_end   END_IMPORT_TABLE
 
#define I_CreateEventFlag   DECLARE_IMPORT(4, CreateEventFlag)
 
#define I_DeleteEventFlag   DECLARE_IMPORT(5, DeleteEventFlag)
 
#define I_SetEventFlag   DECLARE_IMPORT(6, SetEventFlag)
 
#define I_iSetEventFlag   DECLARE_IMPORT(7, iSetEventFlag)
 
#define I_ClearEventFlag   DECLARE_IMPORT(8, ClearEventFlag)
 
#define I_iClearEventFlag   DECLARE_IMPORT(9, iClearEventFlag)
 
#define I_WaitEventFlag   DECLARE_IMPORT(10, WaitEventFlag)
 
#define I_PollEventFlag   DECLARE_IMPORT(11, PollEventFlag)
 
#define I_ReferEventFlagStatus   DECLARE_IMPORT(13, ReferEventFlagStatus)
 
#define I_iReferEventFlagStatus   DECLARE_IMPORT(14, iReferEventFlagStatus)
 

Functions

int CreateEventFlag (iop_event_t *event)
 
int DeleteEventFlag (int ef)
 
int SetEventFlag (int ef, u32 bits)
 
int iSetEventFlag (int ef, u32 bits)
 
int ClearEventFlag (int ef, u32 bits)
 
int iClearEventFlag (int ef, u32 bits)
 
int WaitEventFlag (int ef, u32 bits, int mode, u32 *resbits)
 
int PollEventFlag (int ef, u32 bits, int mode, u32 *resbits)
 
int ReferEventFlagStatus (int ef, iop_event_info_t *info)
 
int iReferEventFlagStatus (int ef, iop_event_info_t *info)
 

Detailed Description

Event flags for threads.

Definition in file thevent.h.


Data Structure Documentation

◆ iop_event_t

struct iop_event_t

Definition at line 37 of file thevent.h.

Data Fields
u32 attr
u32 option
u32 bits

◆ iop_event_info_t

struct iop_event_info_t

Definition at line 44 of file thevent.h.

Data Fields
u32 attr

set by CreateEventFlag

u32 option

set by CreateEventFlag

u32 initBits

initial 'bits' value set by CreateEventFlag

u32 currBits

current 'bits' value

int numThreads

number of threads waiting on this event

int reserved1
int reserved2

Macro Definition Documentation

◆ WEF_AND

#define WEF_AND   0

Definition at line 27 of file thevent.h.

◆ WEF_OR

#define WEF_OR   1

Definition at line 28 of file thevent.h.

◆ WEF_CLEAR

#define WEF_CLEAR   0x10

Definition at line 29 of file thevent.h.

◆ EA_SINGLE

#define EA_SINGLE   0

Only one thread can wait on the event flag.

Definition at line 33 of file thevent.h.

◆ EA_MULTI

#define EA_MULTI   2

Multiple threads can wait on the event flag.

Definition at line 35 of file thevent.h.

◆ thevent_IMPORTS

#define thevent_IMPORTS
Value:
thevent_IMPORTS_start \
\
I_CreateEventFlag \
I_DeleteEventFlag \
\
I_SetEventFlag \
I_iSetEventFlag \
\
I_ClearEventFlag \
I_iClearEventFlag \
\
I_WaitEventFlag \
\
I_PollEventFlag \
\
I_ReferEventFlagStatus \
I_iReferEventFlagStatus \
\
thevent_IMPORTS_end END_IMPORT_TABLE

Definition at line 77 of file thevent.h.

◆ thevent_IMPORTS_start

#define thevent_IMPORTS_start   DECLARE_IMPORT_TABLE(thevent, 1, 1)

Definition at line 99 of file thevent.h.

◆ thevent_IMPORTS_end

#define thevent_IMPORTS_end   END_IMPORT_TABLE

Definition at line 100 of file thevent.h.

◆ I_CreateEventFlag

#define I_CreateEventFlag   DECLARE_IMPORT(4, CreateEventFlag)

Definition at line 102 of file thevent.h.

◆ I_DeleteEventFlag

#define I_DeleteEventFlag   DECLARE_IMPORT(5, DeleteEventFlag)

Definition at line 103 of file thevent.h.

◆ I_SetEventFlag

#define I_SetEventFlag   DECLARE_IMPORT(6, SetEventFlag)

Definition at line 104 of file thevent.h.

◆ I_iSetEventFlag

#define I_iSetEventFlag   DECLARE_IMPORT(7, iSetEventFlag)

Definition at line 105 of file thevent.h.

◆ I_ClearEventFlag

#define I_ClearEventFlag   DECLARE_IMPORT(8, ClearEventFlag)

Definition at line 106 of file thevent.h.

◆ I_iClearEventFlag

#define I_iClearEventFlag   DECLARE_IMPORT(9, iClearEventFlag)

Definition at line 107 of file thevent.h.

◆ I_WaitEventFlag

#define I_WaitEventFlag   DECLARE_IMPORT(10, WaitEventFlag)

Definition at line 108 of file thevent.h.

◆ I_PollEventFlag

#define I_PollEventFlag   DECLARE_IMPORT(11, PollEventFlag)

Definition at line 109 of file thevent.h.

◆ I_ReferEventFlagStatus

#define I_ReferEventFlagStatus   DECLARE_IMPORT(13, ReferEventFlagStatus)

Definition at line 110 of file thevent.h.

◆ I_iReferEventFlagStatus

#define I_iReferEventFlagStatus   DECLARE_IMPORT(14, iReferEventFlagStatus)

Definition at line 111 of file thevent.h.

Function Documentation

◆ CreateEventFlag()

int CreateEventFlag ( iop_event_t event)

Definition at line 9 of file thevent.c.

◆ DeleteEventFlag()

int DeleteEventFlag ( int  ef)

Definition at line 45 of file thevent.c.

◆ SetEventFlag()

int SetEventFlag ( int  ef,
u32  bits 
)

Definition at line 85 of file thevent.c.

◆ iSetEventFlag()

int iSetEventFlag ( int  ef,
u32  bits 
)

Definition at line 158 of file thevent.c.

◆ ClearEventFlag()

int ClearEventFlag ( int  ef,
u32  bits 
)

Definition at line 214 of file thevent.c.

◆ iClearEventFlag()

int iClearEventFlag ( int  ef,
u32  bits 
)

Definition at line 238 of file thevent.c.

◆ WaitEventFlag()

int WaitEventFlag ( int  ef,
u32  bits,
int  mode,
u32 *  resbits 
)

Definition at line 256 of file thevent.c.

◆ PollEventFlag()

int PollEventFlag ( int  ef,
u32  bits,
int  mode,
u32 *  resbits 
)

Definition at line 326 of file thevent.c.

◆ ReferEventFlagStatus()

int ReferEventFlagStatus ( int  ef,
iop_event_info_t info 
)

Definition at line 381 of file thevent.c.

◆ iReferEventFlagStatus()

int iReferEventFlagStatus ( int  ef,
iop_event_info_t info 
)

Definition at line 405 of file thevent.c.