Loading...
Searching...
No Matches
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.
 

Enumerations

enum  { NON_BLOCKING = 0 , BLOCKING }
 

Functions

static void mbox_init (mbox_t *mbox, msg_t *queue, unsigned int queue_size)
 Initialize mbox object.
 
int _mbox_put (mbox_t *mbox, msg_t *msg, int blocking)
 Add message to mailbox.
 
int _mbox_get (mbox_t *mbox, msg_t *msg, int blocking)
 Get message from mailbox.
 
static void mbox_put (mbox_t *mbox, msg_t *msg)
 Add message to mailbox.
 
static int mbox_try_put (mbox_t *mbox, msg_t *msg)
 Add message to mailbox.
 
static void mbox_get (mbox_t *mbox, msg_t *msg)
 Get message from 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 size_t mbox_avail (mbox_t *mbox)
 Get messages available in mbox.
 
static void mbox_unset (mbox_t *mbox)
 Unset's the mbox, effectively deinitializing and invalidating it.