mbox.h File Reference

Mailbox API. More...

Detailed Description

Mailbox API.

Author
Kaspar Schleiser kaspa.nosp@m.r@sc.nosp@m.hleis.nosp@m.er.d.nosp@m.e

Definition in file mbox.h.

#include "list.h"
#include "cib.h"
#include "msg.h"
+ Include dependency graph for mbox.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mbox_t
 Mailbox struct definition. More...
 

Macros

#define MBOX_INIT(queue, queue_size)
 Static initializer for mbox objects. More...
 

Enumerations

enum  { NON_BLOCKING = 0, BLOCKING }
 

Functions

static void mbox_init (mbox_t *mbox, msg_t *queue, unsigned int queue_size)
 Initialize mbox object. More...
 
int _mbox_put (mbox_t *mbox, msg_t *msg, int blocking)
 Add message to mailbox. More...
 
int _mbox_get (mbox_t *mbox, msg_t *msg, int blocking)
 Get message from mailbox. More...
 
static void mbox_put (mbox_t *mbox, msg_t *msg)
 Add message to mailbox. More...
 
static int mbox_try_put (mbox_t *mbox, msg_t *msg)
 Add message to mailbox. More...
 
static void mbox_get (mbox_t *mbox, msg_t *msg)
 Get message from mailbox. More...
 
static int mbox_try_get (mbox_t *mbox, msg_t *msg)
 Get message from mailbox. More...
 
static size_t mbox_size (mbox_t *mbox)
 Get mbox queue size (capacity) More...
 
static size_t mbox_avail (mbox_t *mbox)
 Get messages available in mbox. More...