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 uint32_t OSMessageFlags;
15 
16 enum OSMessageFlags
17 {
20 };
21 
22 struct OSMessage
23 {
24  void *message;
25  uint32_t args[3];
26 };
27 CHECK_OFFSET(OSMessage, 0x00, message);
28 CHECK_OFFSET(OSMessage, 0x04, args);
29 CHECK_SIZE(OSMessage, 0x10);
30 
31 #define OS_MESSAGE_QUEUE_TAG 0x6D536751u
32 
34 {
35  uint32_t tag;
36  const char *name;
37  UNKNOWN(4);
41  uint32_t size;
42  uint32_t first;
43  uint32_t used;
44 };
45 CHECK_OFFSET(OSMessageQueue, 0x00, tag);
46 CHECK_OFFSET(OSMessageQueue, 0x04, name);
47 CHECK_OFFSET(OSMessageQueue, 0x0c, sendQueue);
48 CHECK_OFFSET(OSMessageQueue, 0x1c, recvQueue);
49 CHECK_OFFSET(OSMessageQueue, 0x2c, messages);
50 CHECK_OFFSET(OSMessageQueue, 0x30, size);
51 CHECK_OFFSET(OSMessageQueue, 0x34, first);
52 CHECK_OFFSET(OSMessageQueue, 0x38, used);
53 CHECK_SIZE(OSMessageQueue, 0x3c);
54 
55 #pragma pack(pop)
56 
57 void
59  OSMessage *messages,
60  int32_t size);
61 
62 void
64  OSMessage *messages,
65  int32_t size,
66  const char *name);
67 
68 BOOL
70  OSMessage *message,
71  OSMessageFlags flags);
72 
73 BOOL
75  OSMessage *message,
76  OSMessageFlags flags);
77 
78 BOOL
80  OSMessage *message,
81  OSMessageFlags flags);
82 
83 BOOL
85  OSMessage *message);
86 
89 
90 #ifdef __cplusplus
91 }
92 #endif
93 
OSMessage * messages
Definition: messagequeue.h:40
OSMessageFlags
Definition: messagequeue.h:16
OSMessageQueue * OSGetSystemMessageQueue()
uint32_t tag
Definition: messagequeue.h:35
uint32_t used
Definition: messagequeue.h:43
uint32_t size
Definition: messagequeue.h:41
BOOL OSJamMessage(OSMessageQueue *queue, OSMessage *message, OSMessageFlags flags)
OSThreadQueue sendQueue
Definition: messagequeue.h:38
BOOL OSPeekMessage(OSMessageQueue *queue, OSMessage *message)
BOOL OSReceiveMessage(OSMessageQueue *queue, OSMessage *message, OSMessageFlags flags)
OSThreadQueue recvQueue
Definition: messagequeue.h:39
void OSInitMessageQueueEx(OSMessageQueue *queue, OSMessage *messages, int32_t size, const char *name)
uint32_t args[3]
Definition: messagequeue.h:25
BOOL OSSendMessage(OSMessageQueue *queue, OSMessage *message, OSMessageFlags flags)
int BOOL
Definition: wut_types.h:4
uint32_t first
Definition: messagequeue.h:42
void OSInitMessageQueue(OSMessageQueue *queue, OSMessage *messages, int32_t size)
const char * name
Definition: messagequeue.h:36
void * message
Definition: messagequeue.h:24