ChibiOS/RT
6.0.3
|
Typedefs | |
typedef struct ch_objects_fifo | objects_fifo_t |
Type of an objects FIFO. More... | |
Data Structures | |
struct | ch_objects_fifo |
Type of an objects FIFO. More... | |
Functions | |
static void | chFifoObjectInitAligned (objects_fifo_t *ofp, size_t objsize, size_t objn, unsigned objalign, void *objbuf, msg_t *msgbuf) |
Initializes a FIFO object. More... | |
static void | chFifoObjectInit (objects_fifo_t *ofp, size_t objsize, size_t objn, void *objbuf, msg_t *msgbuf) |
Initializes a FIFO object. More... | |
static void * | chFifoTakeObjectI (objects_fifo_t *ofp) |
Allocates a free object. More... | |
static void * | chFifoTakeObjectTimeoutS (objects_fifo_t *ofp, sysinterval_t timeout) |
Allocates a free object. More... | |
static void * | chFifoTakeObjectTimeout (objects_fifo_t *ofp, sysinterval_t timeout) |
Allocates a free object. More... | |
static void | chFifoReturnObjectI (objects_fifo_t *ofp, void *objp) |
Releases a fetched object. More... | |
static void | chFifoReturnObjectS (objects_fifo_t *ofp, void *objp) |
Releases a fetched object. More... | |
static void | chFifoReturnObject (objects_fifo_t *ofp, void *objp) |
Releases a fetched object. More... | |
static void | chFifoSendObjectI (objects_fifo_t *ofp, void *objp) |
Posts an object. More... | |
static void | chFifoSendObjectS (objects_fifo_t *ofp, void *objp) |
Posts an object. More... | |
static void | chFifoSendObject (objects_fifo_t *ofp, void *objp) |
Posts an object. More... | |
static void | chFifoSendObjectAheadI (objects_fifo_t *ofp, void *objp) |
Posts an high priority object. More... | |
static void | chFifoSendObjectAheadS (objects_fifo_t *ofp, void *objp) |
Posts an high priority object. More... | |
static void | chFifoSendObjectAhead (objects_fifo_t *ofp, void *objp) |
Posts an high priority object. More... | |
static msg_t | chFifoReceiveObjectI (objects_fifo_t *ofp, void **objpp) |
Fetches an object. More... | |
static msg_t | chFifoReceiveObjectTimeoutS (objects_fifo_t *ofp, void **objpp, sysinterval_t timeout) |
Fetches an object. More... | |
static msg_t | chFifoReceiveObjectTimeout (objects_fifo_t *ofp, void **objpp, sysinterval_t timeout) |
Fetches an object. More... | |
typedef struct ch_objects_fifo objects_fifo_t |
Type of an objects FIFO.
|
inlinestatic |
Initializes a FIFO object.
[out] | ofp | pointer to a objects_fifo_t structure |
[in] | objsize | size of objects |
[in] | objn | number of objects available |
[in] | objalign | required objects alignment |
[in] | objbuf | pointer to the buffer of objects, it must be able to hold objn objects of objsize size with objealign alignment |
[in] | msgbuf | pointer to the buffer of messages, it must be able to hold objn messages |
Definition at line 128 of file chobjfifos.h.
References chDbgCheck, chGuardedPoolLoadArray(), chGuardedPoolObjectInitAligned(), chMBObjectInit(), ch_objects_fifo::free, and ch_objects_fifo::mbx.
Referenced by chFactoryCreateObjectsFIFO(), and chFifoObjectInit().
|
inlinestatic |
Initializes a FIFO object.
[out] | ofp | pointer to a objects_fifo_t structure |
[in] | objsize | size of objects |
[in] | objn | number of objects available |
[in] | objbuf | pointer to the buffer of objects, it must be able to hold objn objects of objsize size with objealign alignment |
[in] | msgbuf | pointer to the buffer of messages, it must be able to hold objn messages |
Definition at line 155 of file chobjfifos.h.
References chFifoObjectInitAligned().
|
inlinestatic |
Allocates a free object.
[in] | ofp | pointer to a objects_fifo_t structure |
NULL | if an object is not immediately available. |
Definition at line 173 of file chobjfifos.h.
References chGuardedPoolAllocI(), and ch_objects_fifo::free.
|
inlinestatic |
Allocates a free object.
[in] | ofp | pointer to a objects_fifo_t structure |
[in] | timeout | the number of ticks before the operation timeouts, the following special values are allowed:
|
NULL | if an object is not available within the specified timeout. |
Definition at line 193 of file chobjfifos.h.
References chGuardedPoolAllocTimeoutS(), and ch_objects_fifo::free.
|
inlinestatic |
Allocates a free object.
[in] | ofp | pointer to a objects_fifo_t structure |
[in] | timeout | the number of ticks before the operation timeouts, the following special values are allowed:
|
NULL | if an object is not available within the specified timeout. |
Definition at line 214 of file chobjfifos.h.
References chGuardedPoolAllocTimeout(), and ch_objects_fifo::free.
|
inlinestatic |
Releases a fetched object.
[in] | ofp | pointer to a objects_fifo_t structure |
[in] | objp | pointer to the object to be released |
Definition at line 228 of file chobjfifos.h.
References chGuardedPoolFreeI(), and ch_objects_fifo::free.
|
inlinestatic |
Releases a fetched object.
[in] | ofp | pointer to a objects_fifo_t structure |
[in] | objp | pointer to the object to be released |
Definition at line 242 of file chobjfifos.h.
References chGuardedPoolFreeS(), and ch_objects_fifo::free.
|
inlinestatic |
Releases a fetched object.
[in] | ofp | pointer to a objects_fifo_t structure |
[in] | objp | pointer to the object to be released |
Definition at line 256 of file chobjfifos.h.
References chGuardedPoolFree(), and ch_objects_fifo::free.
|
inlinestatic |
Posts an object.
[in] | ofp | pointer to a objects_fifo_t structure |
[in] | objp | pointer to the object to be posted |
Definition at line 271 of file chobjfifos.h.
References chDbgAssert, chMBPostI(), ch_objects_fifo::mbx, and MSG_OK.
|
inlinestatic |
Posts an object.
[in] | ofp | pointer to a objects_fifo_t structure |
[in] | objp | pointer to the object to be posted |
Definition at line 288 of file chobjfifos.h.
References chDbgAssert, chMBPostTimeoutS(), ch_objects_fifo::mbx, MSG_OK, and TIME_IMMEDIATE.
|
inlinestatic |
Posts an object.
[in] | ofp | pointer to a objects_fifo_t structure |
[in] | objp | pointer to the object to be released |
Definition at line 305 of file chobjfifos.h.
References chDbgAssert, chMBPostTimeout(), ch_objects_fifo::mbx, MSG_OK, and TIME_IMMEDIATE.
|
inlinestatic |
Posts an high priority object.
[in] | ofp | pointer to a objects_fifo_t structure |
[in] | objp | pointer to the object to be posted |
Definition at line 322 of file chobjfifos.h.
References chDbgAssert, chMBPostAheadI(), ch_objects_fifo::mbx, and MSG_OK.
|
inlinestatic |
Posts an high priority object.
[in] | ofp | pointer to a objects_fifo_t structure |
[in] | objp | pointer to the object to be posted |
Definition at line 339 of file chobjfifos.h.
References chDbgAssert, chMBPostAheadTimeoutS(), ch_objects_fifo::mbx, MSG_OK, and TIME_IMMEDIATE.
|
inlinestatic |
Posts an high priority object.
[in] | ofp | pointer to a objects_fifo_t structure |
[in] | objp | pointer to the object to be released |
Definition at line 356 of file chobjfifos.h.
References chDbgAssert, chMBPostAheadTimeout(), ch_objects_fifo::mbx, MSG_OK, and TIME_IMMEDIATE.
|
inlinestatic |
Fetches an object.
[in] | ofp | pointer to a objects_fifo_t structure |
[in] | objpp | pointer to the fetched object reference |
MSG_OK | if an object has been correctly fetched. |
MSG_TIMEOUT | if the FIFO is empty and a message cannot be fetched. |
Definition at line 375 of file chobjfifos.h.
References chMBFetchI(), and ch_objects_fifo::mbx.
|
inlinestatic |
Fetches an object.
[in] | ofp | pointer to a objects_fifo_t structure |
[in] | objpp | pointer to the fetched object reference |
[in] | timeout | the number of ticks before the operation timeouts, the following special values are allowed:
|
MSG_OK | if an object has been correctly fetched. |
MSG_TIMEOUT | if the operation has timed out. |
Definition at line 397 of file chobjfifos.h.
References chMBFetchTimeoutS(), and ch_objects_fifo::mbx.
|
inlinestatic |
Fetches an object.
[in] | ofp | pointer to a objects_fifo_t structure |
[in] | objpp | pointer to the fetched object reference |
[in] | timeout | the number of ticks before the operation timeouts, the following special values are allowed:
|
MSG_OK | if an object has been correctly fetched. |
MSG_TIMEOUT | if the operation has timed out. |
Definition at line 420 of file chobjfifos.h.
References chMBFetchTimeout(), and ch_objects_fifo::mbx.