ChibiOS/RT
5.1.0
|
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 | chFifoObjectInit (objects_fifo_t *ofp, size_t objsize, size_t objn, unsigned objalign, 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 132 of file chfifo.h.
References chGuardedPoolLoadArray(), chGuardedPoolObjectInitAligned(), chMBObjectInit(), ch_objects_fifo::free, and ch_objects_fifo::mbx.
Referenced by chFactoryCreateObjectsFIFO().
|
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 150 of file chfifo.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 170 of file chfifo.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 191 of file chfifo.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 205 of file chfifo.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 219 of file chfifo.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 233 of file chfifo.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 248 of file chfifo.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 265 of file chfifo.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 282 of file chfifo.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 299 of file chfifo.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 316 of file chfifo.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 333 of file chfifo.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 352 of file chfifo.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 374 of file chfifo.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 397 of file chfifo.h.
References chMBFetchTimeout(), and ch_objects_fifo::mbx.