WUT  0.1
Wii U Toolchain
messagequeue.h
Go to the documentation of this file.
1 #pragma once
2 #include <wut.h>
3 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 typedef enum OSMessageFlags
15 {
19 
20 struct OSMessage
21 {
22  void *message;
23  uint32_t args[3];
24 };
25 CHECK_OFFSET(OSMessage, 0x00, message);
26 CHECK_OFFSET(OSMessage, 0x04, args);
27 CHECK_SIZE(OSMessage, 0x10);
28 
29 #define OS_MESSAGE_QUEUE_TAG 0x6D536751u
30 
32 {
33  uint32_t tag;
34  const char *name;
35  UNKNOWN(4);
39  uint32_t size;
40  uint32_t first;
41  uint32_t used;
42 };
43 CHECK_OFFSET(OSMessageQueue, 0x00, tag);
44 CHECK_OFFSET(OSMessageQueue, 0x04, name);
45 CHECK_OFFSET(OSMessageQueue, 0x0c, sendQueue);
46 CHECK_OFFSET(OSMessageQueue, 0x1c, recvQueue);
47 CHECK_OFFSET(OSMessageQueue, 0x2c, messages);
48 CHECK_OFFSET(OSMessageQueue, 0x30, size);
49 CHECK_OFFSET(OSMessageQueue, 0x34, first);
50 CHECK_OFFSET(OSMessageQueue, 0x38, used);
51 CHECK_SIZE(OSMessageQueue, 0x3c);
52 
53 #pragma pack(pop)
54 
55 void
57  OSMessage *messages,
58  int32_t size);
59 
60 void
62  OSMessage *messages,
63  int32_t size,
64  const char *name);
65 
66 BOOL
68  OSMessage *message,
69  OSMessageFlags flags);
70 
71 BOOL
73  OSMessage *message,
74  OSMessageFlags flags);
75 
76 BOOL
78  OSMessage *message,
79  OSMessageFlags flags);
80 
81 BOOL
83  OSMessage *message);
84 
87 
88 #ifdef __cplusplus
89 }
90 #endif
91 
OSMessage * messages
Definition: messagequeue.h:38
OSMessageFlags
Definition: messagequeue.h:14
OSMessageQueue * OSGetSystemMessageQueue()
uint32_t tag
Definition: messagequeue.h:33
uint32_t used
Definition: messagequeue.h:41
uint32_t size
Definition: messagequeue.h:39
BOOL OSJamMessage(OSMessageQueue *queue, OSMessage *message, OSMessageFlags flags)
OSThreadQueue sendQueue
Definition: messagequeue.h:36
BOOL OSPeekMessage(OSMessageQueue *queue, OSMessage *message)
BOOL OSReceiveMessage(OSMessageQueue *queue, OSMessage *message, OSMessageFlags flags)
OSThreadQueue recvQueue
Definition: messagequeue.h:37
void OSInitMessageQueueEx(OSMessageQueue *queue, OSMessage *messages, int32_t size, const char *name)
uint32_t args[3]
Definition: messagequeue.h:23
BOOL OSSendMessage(OSMessageQueue *queue, OSMessage *message, OSMessageFlags flags)
int BOOL
Definition: wut_types.h:4
uint32_t first
Definition: messagequeue.h:40
void OSInitMessageQueue(OSMessageQueue *queue, OSMessage *messages, int32_t size)
const char * name
Definition: messagequeue.h:34
void * message
Definition: messagequeue.h:22