sdk-core
v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Toggle main menu visibility
Loading...
Searching...
No Matches
thevent.h
Go to the documentation of this file.
1
/*
2
# _____ ___ ____ ___ ____
3
# ____| | ____| | | |____|
4
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5
#-----------------------------------------------------------------------
6
# Copyright (c) 2003 Marcus R. Brown <mrbrown@0xd6.org>
7
# Licenced under Academic Free License version 2.0
8
# Review ps2sdk README & LICENSE files for further details.
9
*/
10
16
17
#ifndef __THEVENT_H__
18
#define __THEVENT_H__
19
20
#include <types.h>
21
#include <
irx.h
>
22
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
27
/* Defines for WaitEventFlag */
28
#define WEF_AND 0
29
#define WEF_OR 1
30
#define WEF_CLEAR 0x10
31
32
// Attributes for event flags
34
#define EA_SINGLE 0
36
#define EA_MULTI 2
37
38
typedef
struct
39
{
40
u32 attr;
41
u32 option;
42
u32 bits;
43
}
iop_event_t
;
44
45
typedef
struct
46
{
48
u32
attr
;
50
u32
option
;
52
u32
initBits
;
54
u32
currBits
;
56
int
numThreads
;
57
int
reserved1;
58
int
reserved2;
59
}
iop_event_info_t
;
60
61
extern
int
CreateEventFlag(
iop_event_t
*
event
);
62
extern
int
DeleteEventFlag(
int
ef);
63
64
extern
int
SetEventFlag(
int
ef, u32 bits);
65
extern
int
iSetEventFlag(
int
ef, u32 bits);
66
67
extern
int
ClearEventFlag(
int
ef, u32 bits);
68
extern
int
iClearEventFlag(
int
ef, u32 bits);
69
70
extern
int
WaitEventFlag(
int
ef, u32 bits,
int
mode, u32 *resbits);
71
72
extern
int
PollEventFlag(
int
ef, u32 bits,
int
mode, u32 *resbits);
73
74
extern
int
ReferEventFlagStatus(
int
ef,
iop_event_info_t
*info);
75
extern
int
iReferEventFlagStatus(
int
ef,
iop_event_info_t
*info);
76
77
// clang-format off
78
#define thevent_IMPORTS \
79
thevent_IMPORTS_start \
80
\
81
I_CreateEventFlag \
82
I_DeleteEventFlag \
83
\
84
I_SetEventFlag \
85
I_iSetEventFlag \
86
\
87
I_ClearEventFlag \
88
I_iClearEventFlag \
89
\
90
I_WaitEventFlag \
91
\
92
I_PollEventFlag \
93
\
94
I_ReferEventFlagStatus \
95
I_iReferEventFlagStatus \
96
\
97
thevent_IMPORTS_end END_IMPORT_TABLE
98
// clang-format on
99
100
#define thevent_IMPORTS_start DECLARE_IMPORT_TABLE(thevent, 1, 1)
101
#define thevent_IMPORTS_end END_IMPORT_TABLE
102
103
#define I_CreateEventFlag DECLARE_IMPORT(4, CreateEventFlag)
104
#define I_DeleteEventFlag DECLARE_IMPORT(5, DeleteEventFlag)
105
#define I_SetEventFlag DECLARE_IMPORT(6, SetEventFlag)
106
#define I_iSetEventFlag DECLARE_IMPORT(7, iSetEventFlag)
107
#define I_ClearEventFlag DECLARE_IMPORT(8, ClearEventFlag)
108
#define I_iClearEventFlag DECLARE_IMPORT(9, iClearEventFlag)
109
#define I_WaitEventFlag DECLARE_IMPORT(10, WaitEventFlag)
110
#define I_PollEventFlag DECLARE_IMPORT(11, PollEventFlag)
111
#define I_ReferEventFlagStatus DECLARE_IMPORT(13, ReferEventFlagStatus)
112
#define I_iReferEventFlagStatus DECLARE_IMPORT(14, iReferEventFlagStatus)
113
114
#ifdef __cplusplus
115
}
116
#endif
117
118
#endif
/* __THEVENT_H__ */
irx.h
event
Definition
thcommon.h:76
iop_event_info_t
Definition
thevent.h:46
iop_event_info_t::attr
u32 attr
Definition
thevent.h:48
iop_event_info_t::initBits
u32 initBits
Definition
thevent.h:52
iop_event_info_t::option
u32 option
Definition
thevent.h:50
iop_event_info_t::currBits
u32 currBits
Definition
thevent.h:54
iop_event_info_t::numThreads
int numThreads
Definition
thevent.h:56
iop_event_t
Definition
thevent.h:39
core
threadman
include
thevent.h
Generated by
1.18.0