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