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