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