Go to the documentation of this file.
34 #define MBOX_INIT(queue, queue_size) { \
35 { 0 }, { 0 }, CIB_INIT(queue_size), queue \
63 unsigned int queue_size)
msg_t * msg_array
ptr to array of msg queue
int _mbox_put(mbox_t *mbox, msg_t *msg, int blocking)
Add message to mailbox.
static void mbox_init(mbox_t *mbox, msg_t *queue, unsigned int queue_size)
Initialize mbox object.
static int mbox_try_put(mbox_t *mbox, msg_t *msg)
Add message to mailbox.
Messaging API for inter process communication.
#define MBOX_INIT(queue, queue_size)
Static initializer for mbox objects.
unsigned int mask
Size of buffer -1, i.e.
@ NON_BLOCKING
non-blocking mode
list_node_t writers
list of threads waiting to send
Mailbox struct definition.
static void mbox_put(mbox_t *mbox, msg_t *msg)
Add message to mailbox.
static int mbox_try_get(mbox_t *mbox, msg_t *msg)
Get message from mailbox.
static size_t mbox_size(mbox_t *mbox)
Get mbox queue size (capacity)
static unsigned int cib_avail(const cib_t *cib)
Calculates difference between cib_put() and cib_get() accesses.
circular integer buffer structure
int _mbox_get(mbox_t *mbox, msg_t *msg, int blocking)
Get message from mailbox.
Circular integer buffer interface.
static void mbox_get(mbox_t *mbox, msg_t *msg)
Get message from mailbox.
Describes a message object which can be sent between threads.
list_node_t readers
list of threads waiting for message
static size_t mbox_avail(mbox_t *mbox)
Get messages available in mbox.
cib_t cib
cib for msg array