RetroArch
message.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------
2 
3 message.h -- Thread subsystem II
4 
5 Copyright (C) 2004
6 Michael Wiedenbauer (shagkur)
7 Dave Murphy (WinterMute)
8 
9 This software is provided 'as-is', without any express or implied
10 warranty. In no event will the authors be held liable for any
11 damages arising from the use of this software.
12 
13 Permission is granted to anyone to use this software for any
14 purpose, including commercial applications, and to alter it and
15 redistribute it freely, subject to the following restrictions:
16 
17 1. The origin of this software must not be misrepresented; you
18 must not claim that you wrote the original software. If you use
19 this software in a product, an acknowledgment in the product
20 documentation would be appreciated but is not required.
21 
22 2. Altered source versions must be plainly marked as such, and
23 must not be misrepresented as being the original software.
24 
25 3. This notice may not be removed or altered from any source
26 distribution.
27 
28 -------------------------------------------------------------*/
29 
30 
31 #ifndef __MESSAGE_H__
32 #define __MESSAGE_H__
33 
39 #include <gctypes.h>
40 
41 #define MQ_BOX_NULL 0xffffffff
42 
43 #define MQ_ERROR_SUCCESSFUL 0
44 #define MQ_ERROR_TOOMANY -5
45 
46 #define MQ_MSG_BLOCK 0
47 #define MQ_MSG_NOBLOCK 1
48 
49 
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53 
54 
58 typedef u32 mqbox_t;
59 
60 
64 typedef void* mqmsg_t;
65 
66 
67 
75 s32 MQ_Init(mqbox_t *mqbox,u32 count);
76 
77 
84 void MQ_Close(mqbox_t mqbox);
85 
86 
96 
97 
107 
108 
118 
119 #ifdef __cplusplus
120  }
121 #endif
122 
123 #endif
s32 MQ_Init(mqbox_t *mqbox, u32 count)
Initializes a message queue.
Definition: message.c:86
int32_t s32
32bit signed integer
Definition: gctypes.h:24
void MQ_Close(mqbox_t mqbox)
Closes the message queue and releases all memory.
Definition: message.c:108
Data type definitions.
BOOL MQ_Jam(mqbox_t mqbox, mqmsg_t msg, u32 flags)
Sends a message to the given message queue and jams it in front of the queue.
Definition: message.c:153
BOOL MQ_Send(mqbox_t mqbox, mqmsg_t msg, u32 flags)
Sends a message to the given message queue.
Definition: message.c:121
BOOL MQ_Receive(mqbox_t mqbox, mqmsg_t *msg, u32 flags)
Sends a message to the given message queue.
Definition: message.c:137
GLuint GLuint GLsizei count
Definition: glext.h:6292
static const unsigned char msg[]
Definition: ccm.c:375
void * mqmsg_t
typedef for the message pointer
Definition: message.h:64
unsigned int BOOL
Definition: gctypes.h:51
u32 mqbox_t
typedef for the message queue handle
Definition: message.h:58
GLbitfield flags
Definition: glext.h:7828
uint32_t u32
32bit unsigned integer
Definition: gctypes.h:19