RetroArch
Classes | Macros | Typedefs | Functions | Variables
message.c File Reference
#include <asm.h>
#include <stdlib.h>
#include <lwp_messages.h>
#include <lwp_objmgr.h>
#include <lwp_config.h>
#include "message.h"
Include dependency graph for message.c:

Classes

struct  _mqbox_st
 

Macros

#define LWP_OBJTYPE_MBOX   6
 
#define LWP_CHECK_MBOX(hndl)
 

Typedefs

typedef struct _mqbox_st mqbox_st
 

Functions

void __lwp_mqbox_init ()
 
static __inline__ mqbox_st__lwp_mqbox_open (mqbox_t mbox)
 
static __inline__ void __lwp_mqbox_free (mqbox_st *mqbox)
 
static mqbox_st__lwp_mqbox_allocate ()
 
s32 MQ_Init (mqbox_t *mqbox, u32 count)
 Initializes a message queue. More...
 
void MQ_Close (mqbox_t mqbox)
 Closes the message queue and releases all memory. More...
 
BOOL MQ_Send (mqbox_t mqbox, mqmsg_t msg, u32 flags)
 Sends a message to the given message queue. More...
 
BOOL MQ_Receive (mqbox_t mqbox, mqmsg_t *msg, u32 flags)
 Sends a message to the given message queue. More...
 
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. More...
 

Variables

lwp_objinfo _lwp_mqbox_objects
 

Macro Definition Documentation

◆ LWP_CHECK_MBOX

#define LWP_CHECK_MBOX (   hndl)
Value:
{ \
if(((hndl)==MQ_BOX_NULL) || (LWP_OBJTYPE(hndl)!=LWP_OBJTYPE_MBOX)) \
return NULL; \
}
#define LWP_OBJTYPE(id)
Definition: lwp_objmgr.h:9
#define NULL
Pointer to 0.
Definition: gctypes.h:65
#define LWP_OBJTYPE_MBOX
Definition: message.c:39
#define MQ_BOX_NULL
Definition: message.h:41

◆ LWP_OBJTYPE_MBOX

#define LWP_OBJTYPE_MBOX   6

Typedef Documentation

◆ mqbox_st

typedef struct _mqbox_st mqbox_st

Function Documentation

◆ __lwp_mqbox_allocate()

static mqbox_st* __lwp_mqbox_allocate ( )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __lwp_mqbox_free()

static __inline__ void __lwp_mqbox_free ( mqbox_st mqbox)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __lwp_mqbox_init()

void __lwp_mqbox_init ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __lwp_mqbox_open()

static __inline__ mqbox_st* __lwp_mqbox_open ( mqbox_t  mbox)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MQ_Close()

void MQ_Close ( mqbox_t  mqbox)

Closes the message queue and releases all memory.

Parameters
[in]mqboxhandle to the mqbox_t structure.
Returns
none
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MQ_Init()

s32 MQ_Init ( mqbox_t mqbox,
u32  count 
)

Initializes a message queue.

Parameters
[out]mqboxpointer to the mqbox_t handle.
[in]countmaximum number of messages the queue can hold
Returns
0 on success, <0 on error
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MQ_Jam()

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.

Parameters
[in]mqboxmqbox_t handle to the message queue
[in]msgmessage to send
[in]flagsmessage flags (MQ_MSG_BLOCK, MQ_MSG_NOBLOCK)
Returns
bool result
Here is the call graph for this function:

◆ MQ_Receive()

BOOL MQ_Receive ( mqbox_t  mqbox,
mqmsg_t msg,
u32  flags 
)

Sends a message to the given message queue.

Parameters
[in]mqboxmqbox_t handle to the message queue
[in]msgpointer to a mqmsg_t_t-type message to receive.
[in]flagsmessage flags (MQ_MSG_BLOCK, MQ_MSG_NOBLOCK)
Returns
bool result
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MQ_Send()

BOOL MQ_Send ( mqbox_t  mqbox,
mqmsg_t  msg,
u32  flags 
)

Sends a message to the given message queue.

Parameters
[in]mqboxmqbox_t handle to the message queue
[in]msgmessage to send
[in]flagsmessage flags (MQ_MSG_BLOCK, MQ_MSG_NOBLOCK)
Returns
bool result
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ _lwp_mqbox_objects

lwp_objinfo _lwp_mqbox_objects