55 #if (CH_CFG_USE_MAILBOXES == TRUE) || defined(__DOXYGEN__) 89 chDbgCheck((mbp != NULL) && (buf != NULL) && (n > (
size_t)0));
140 mbp->
cnt = (size_t)0;
223 }
while (rdymsg ==
MSG_OK);
348 }
while (rdymsg ==
MSG_OK);
458 *msgp = *mbp->
rdptr++;
473 }
while (rdymsg ==
MSG_OK);
505 *msgp = *mbp->
rdptr++;
static void chThdQueueObjectInit(threads_queue_t *tqp)
Initializes a threads queue object.
msg_t chMBPostI(mailbox_t *mbp, msg_t msg)
Posts a message into a mailbox.
size_t cnt
Messages in queue.
uint64_t sysinterval_t
Type of time interval.
static size_t chMBGetUsedCountI(const mailbox_t *mbp)
Returns the number of used message slots into a mailbox.
static void chSysLock(void)
Enters the kernel lock state.
void chThdDequeueAllI(threads_queue_t *tqp, msg_t msg)
Dequeues and wakes up all threads from the threads queue object.
msg_t chMBPostAheadTimeoutS(mailbox_t *mbp, msg_t msg, sysinterval_t timeout)
Posts an high priority message into a mailbox.
msg_t chThdEnqueueTimeoutS(threads_queue_t *tqp, sysinterval_t timeout)
Enqueues the caller thread on a threads queue object.
void chMBObjectInit(mailbox_t *mbp, msg_t *buf, size_t n)
Initializes a mailbox_t object.
static void chSysUnlock(void)
Leaves the kernel lock state.
msg_t chMBFetchI(mailbox_t *mbp, msg_t *msgp)
Retrieves a message from a mailbox.
void chMBReset(mailbox_t *mbp)
Resets a mailbox_t object.
msg_t * top
Pointer to the location after the buffer.
msg_t chMBPostAheadTimeout(mailbox_t *mbp, msg_t msg, sysinterval_t timeout)
Posts an high priority message into a mailbox.
msg_t chMBPostTimeoutS(mailbox_t *mbp, msg_t msg, sysinterval_t timeout)
Posts a message into a mailbox.
#define MSG_TIMEOUT
Wakeup caused by a timeout condition.
void chSchRescheduleS(void)
Performs a reschedule if a higher priority thread is runnable.
#define chDbgCheck(c)
Function parameters check.
msg_t chMBPostAheadI(mailbox_t *mbp, msg_t msg)
Posts an high priority message into a mailbox.
static size_t chMBGetFreeCountI(const mailbox_t *mbp)
Returns the number of free message slots into a mailbox.
msg_t chMBFetchTimeout(mailbox_t *mbp, msg_t *msgp, sysinterval_t timeout)
Retrieves a message from a mailbox.
msg_t * buffer
Pointer to the mailbox buffer.
void chMBResetI(mailbox_t *mbp)
Resets a mailbox_t object.
#define MSG_OK
Normal wakeup message.
void chThdDequeueNextI(threads_queue_t *tqp, msg_t msg)
Dequeues and wakes up one thread from the threads queue object, if any.
threads_queue_t qr
Queued readers.
msg_t * wrptr
Write pointer.
threads_queue_t qw
Queued writers.
void chDbgCheckClassI(void)
I-class functions context check.
void chDbgCheckClassS(void)
S-class functions context check.
bool reset
True in reset state.
msg_t chMBPostTimeout(mailbox_t *mbp, msg_t msg, sysinterval_t timeout)
Posts a message into a mailbox.
ChibiOS/RT main include file.
Structure representing a mailbox object.
msg_t * rdptr
Read pointer.
msg_t chMBFetchTimeoutS(mailbox_t *mbp, msg_t *msgp, sysinterval_t timeout)
Retrieves a message from a mailbox.
#define MSG_RESET
Wakeup caused by a reset condition.