ChibiOS/RT Architecture - Reference Manual - Guides |
Mailboxes macros and structures. More...
Go to the source code of this file.
Defines | |
#define | chMBSize(mbp) ((mbp)->mb_top - (mbp)->mb_buffer) |
Returns the mailbox buffer size. | |
#define | chMBGetEmpty(mbp) chSemGetCounterI(&(mbp)->mb_emptysem) |
Returns the free space into the mailbox. | |
#define | chMBGetFull(mbp) chSemGetCounterI(&(mbp)->mb_fullsem) |
Returns the number of messages into the mailbox. | |
#define | chMBPeek(mbp) (*(mbp)->mb_rdptr) |
Returns the next message in the queue without removing it. | |
#define | _MAILBOX_DATA(name, buffer, size) |
Data part of a static mailbox initializer. | |
#define | MAILBOX_DECL(name, buffer, size) Mailbox name = _MAILBOX_DATA(name, buffer, size) |
Static mailbox initializer. | |
Functions | |
void | chMBInit (Mailbox *mbp, msg_t *buf, cnt_t n) |
Initializes a Mailbox object. | |
void | chMBReset (Mailbox *mbp) |
Resets a Mailbox object. | |
msg_t | chMBPost (Mailbox *mbp, msg_t msg, systime_t time) |
Posts a message into a mailbox. | |
msg_t | chMBPostS (Mailbox *mbp, msg_t msg, systime_t time) |
Posts a message into a mailbox. | |
msg_t | chMBPostAhead (Mailbox *mbp, msg_t msg, systime_t time) |
Posts an high priority message into a mailbox. | |
msg_t | chMBPostAheadS (Mailbox *mbp, msg_t msg, systime_t time) |
Posts an high priority message into a mailbox. | |
msg_t | chMBFetch (Mailbox *mbp, msg_t *msgp, systime_t time) |
Retrieves a message from a mailbox. | |
msg_t | chMBFetchS (Mailbox *mbp, msg_t *msgp, systime_t time) |
Retrieves a message from a mailbox. |
Mailboxes macros and structures.
Definition in file chmboxes.h.