WUT  0.1
Wii U Toolchain
event.h
Go to the documentation of this file.
1 #pragma once
2 #include <wut.h>
3 #include "thread.h"
4 #include "threadqueue.h"
5 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 typedef struct OSEvent OSEvent;
17 typedef uint32_t OSEventMode;
18 
19 enum OSEventMode
20 {
23 };
24 
25 #define OS_EVENT_TAG 0x65566E54u
26 
27 struct OSEvent
28 {
29  uint32_t tag;
30  const char *name;
31  UNKNOWN(4);
34  OSEventMode mode;
35 };
36 CHECK_OFFSET(OSEvent, 0x0, tag);
37 CHECK_OFFSET(OSEvent, 0x4, name);
38 CHECK_OFFSET(OSEvent, 0xc, value);
39 CHECK_OFFSET(OSEvent, 0x10, queue);
40 CHECK_OFFSET(OSEvent, 0x20, mode);
41 CHECK_SIZE(OSEvent, 0x24);
42 
43 #pragma pack(pop)
44 
45 void
46 OSInitEvent(OSEvent *event,
47  BOOL value,
48  OSEventMode mode);
49 
50 void
51 OSInitEventEx(OSEvent *event,
52  BOOL value,
53  OSEventMode mode,
54  char *name);
55 
56 void
57 OSSignalEvent(OSEvent *event);
58 
59 void
61 
62 void
63 OSWaitEvent(OSEvent *event);
64 
65 void
66 OSResetEvent(OSEvent *event);
67 
68 BOOL
70  OSTime timeout);
71 
72 #ifdef __cplusplus
73 }
74 #endif
75 
int64_t OSTime
Definition: time.h:17
void OSResetEvent(OSEvent *event)
void OSSignalEvent(OSEvent *event)
void OSInitEvent(OSEvent *event, BOOL value, OSEventMode mode)
const char * name
Definition: event.h:30
void OSSignalEventAll(OSEvent *event)
BOOL value
Definition: event.h:32
void OSWaitEvent(OSEvent *event)
BOOL OSWaitEventWithTimeout(OSEvent *event, OSTime timeout)
uint32_t tag
Definition: event.h:29
OSEventMode
Definition: event.h:19
void OSInitEventEx(OSEvent *event, BOOL value, OSEventMode mode, char *name)
int BOOL
Definition: wut_types.h:4
OSEventMode mode
Definition: event.h:34
Definition: event.h:27
OSThreadQueue queue
Definition: event.h:33