47 #if (CH_CFG_USE_OBJ_FIFOS == TRUE) || defined(__DOXYGEN__) 61 #if CH_CFG_USE_MEMPOOLS == FALSE 62 #error "CH_CFG_USE_OBJ_FIFOS requires CH_CFG_USE_MEMPOOLS" 65 #if CH_CFG_USE_SEMAPHORES == FALSE 66 #error "CH_CFG_USE_OBJ_FIFOS requires CH_CFG_USE_SEMAPHORES" 69 #if CH_CFG_USE_MAILBOXES == FALSE 70 #error "CH_CFG_USE_OBJ_FIFOS requires CH_CFG_USE_MAILBOXES" 129 size_t objn,
unsigned objalign,
130 void *objbuf, msg_t *msgbuf) {
132 chDbgCheck((objsize >= objalign) && ((objsize % objalign) == 0U));
156 size_t objn,
void *objbuf,
mailbox_t mbx
Mailbox of the sent objects.
static void chFifoReturnObjectI(objects_fifo_t *ofp, void *objp)
Releases a fetched object.
msg_t chMBPostI(mailbox_t *mbp, msg_t msg)
Posts a message into a mailbox.
static void chFifoSendObjectI(objects_fifo_t *ofp, void *objp)
Posts an object.
static msg_t chFifoReceiveObjectI(objects_fifo_t *ofp, void **objpp)
Fetches an object.
void chGuardedPoolFree(guarded_memory_pool_t *gmp, void *objp)
Releases an object into a guarded memory pool.
static void chFifoSendObject(objects_fifo_t *ofp, void *objp)
Posts an object.
uint64_t sysinterval_t
Type of time interval.
static void chFifoSendObjectAheadI(objects_fifo_t *ofp, void *objp)
Posts an high priority object.
static void * chFifoTakeObjectTimeout(objects_fifo_t *ofp, sysinterval_t timeout)
Allocates a free object.
msg_t chMBPostAheadTimeoutS(mailbox_t *mbp, msg_t msg, sysinterval_t timeout)
Posts an high priority message into a mailbox.
void * chGuardedPoolAllocTimeout(guarded_memory_pool_t *gmp, sysinterval_t timeout)
Allocates an object from a guarded memory pool.
void chMBObjectInit(mailbox_t *mbp, msg_t *buf, size_t n)
Initializes a mailbox_t object.
static void * chGuardedPoolAllocI(guarded_memory_pool_t *gmp)
Allocates an object from a guarded memory pool.
msg_t chMBFetchI(mailbox_t *mbp, msg_t *msgp)
Retrieves a message from a mailbox.
static void chFifoReturnObjectS(objects_fifo_t *ofp, void *objp)
Releases a fetched object.
static void chFifoSendObjectAheadS(objects_fifo_t *ofp, void *objp)
Posts an high priority object.
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.
static void * chFifoTakeObjectTimeoutS(objects_fifo_t *ofp, sysinterval_t timeout)
Allocates a free object.
static void * chFifoTakeObjectI(objects_fifo_t *ofp)
Allocates a free object.
static void chGuardedPoolFreeS(guarded_memory_pool_t *gmp, void *objp)
Releases an object into a guarded memory pool.
#define chDbgCheck(c)
Function parameters check.
msg_t chMBPostAheadI(mailbox_t *mbp, msg_t msg)
Posts an high priority message into a mailbox.
static msg_t chFifoReceiveObjectTimeout(objects_fifo_t *ofp, void **objpp, sysinterval_t timeout)
Fetches an object.
msg_t chMBFetchTimeout(mailbox_t *mbp, msg_t *msgp, sysinterval_t timeout)
Retrieves a message from a mailbox.
static void chFifoSendObjectAhead(objects_fifo_t *ofp, void *objp)
Posts an high priority object.
static void chFifoObjectInitAligned(objects_fifo_t *ofp, size_t objsize, size_t objn, unsigned objalign, void *objbuf, msg_t *msgbuf)
Initializes a FIFO object.
static void chFifoObjectInit(objects_fifo_t *ofp, size_t objsize, size_t objn, void *objbuf, msg_t *msgbuf)
Initializes a FIFO object.
#define MSG_OK
Normal wakeup message.
static void chGuardedPoolFreeI(guarded_memory_pool_t *gmp, void *objp)
Releases an object into a guarded memory pool.
static void chFifoSendObjectS(objects_fifo_t *ofp, void *objp)
Posts an object.
void * chGuardedPoolAllocTimeoutS(guarded_memory_pool_t *gmp, sysinterval_t timeout)
Allocates an object from a guarded memory pool.
struct ch_objects_fifo objects_fifo_t
Type of an objects FIFO.
#define TIME_IMMEDIATE
Zero interval specification for some functions with a timeout specification.
static msg_t chFifoReceiveObjectTimeoutS(objects_fifo_t *ofp, void **objpp, sysinterval_t timeout)
Fetches an object.
#define chDbgAssert(c, r)
Condition assertion.
guarded_memory_pool_t free
Pool of the free objects.
void chGuardedPoolObjectInitAligned(guarded_memory_pool_t *gmp, size_t size, unsigned align)
Initializes an empty guarded memory pool.
Guarded memory pool descriptor.
msg_t chMBPostTimeout(mailbox_t *mbp, msg_t msg, sysinterval_t timeout)
Posts a message into a mailbox.
Structure representing a mailbox object.
void chGuardedPoolLoadArray(guarded_memory_pool_t *gmp, void *p, size_t n)
Loads a guarded memory pool with an array of static objects.
msg_t chMBFetchTimeoutS(mailbox_t *mbp, msg_t *msgp, sysinterval_t timeout)
Retrieves a message from a mailbox.
static void chFifoReturnObject(objects_fifo_t *ofp, void *objp)
Releases a fetched object.