Thread subsystem II.
More...
#include <gctypes.h>
#include <gcbool.h>
|
#define | MQ_BOX_NULL 0xffffffff |
|
#define | MQ_ERROR_SUCCESSFUL 0 |
|
#define | MQ_ERROR_TOOMANY -5 |
|
#define | MQ_MSG_BLOCK 0 |
|
#define | MQ_MSG_NOBLOCK 1 |
|
|
typedef u32 | mqbox_t |
| typedef for the message queue handle
|
|
typedef void * | mqmsg_t |
| typedef for the message pointer
|
|
◆ MQ_Close()
Closes the message queue and releases all memory.
- Parameters
-
[in] | mqbox | handle to the mqbox_t structure. |
- Returns
- none
◆ MQ_Init()
Initializes a message queue.
- Parameters
-
[out] | mqbox | pointer to the mqbox_t handle. |
[in] | count | maximum number of messages the queue can hold |
- Returns
- 0 on success, <0 on error
◆ MQ_Jam()
Sends a message to the given message queue and jams it in front of the queue.
- Parameters
-
[in] | mqbox | mqbox_t handle to the message queue |
[in] | msg | message to send |
[in] | flags | message flags (MQ_MSG_BLOCK, MQ_MSG_NOBLOCK) |
- Returns
- bool result
◆ MQ_Receive()
Sends a message to the given message queue.
- Parameters
-
[in] | mqbox | mqbox_t handle to the message queue |
[in] | msg | pointer to a mqmsg_t_t-type message to receive. |
[in] | flags | message flags (MQ_MSG_BLOCK, MQ_MSG_NOBLOCK) |
- Returns
- bool result
◆ MQ_Send()
Sends a message to the given message queue.
- Parameters
-
[in] | mqbox | mqbox_t handle to the message queue |
[in] | msg | message to send |
[in] | flags | message flags (MQ_MSG_BLOCK, MQ_MSG_NOBLOCK) |
- Returns
- bool result