ChibiOS/NIL  3.2.2
Collaboration diagram for Objects FIFOs:

Detailed Description

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 Documentation

Type of an objects FIFO.

Function Documentation

static void chFifoObjectInitAligned ( objects_fifo_t ofp,
size_t  objsize,
size_t  objn,
unsigned  objalign,
void *  objbuf,
msg_t *  msgbuf 
)
inlinestatic

Initializes a FIFO object.

Precondition
The messages size must be a multiple of the alignment requirement.
Parameters
[out]ofppointer to a objects_fifo_t structure
[in]objsizesize of objects
[in]objnnumber of objects available
[in]objalignrequired objects alignment
[in]objbufpointer to the buffer of objects, it must be able to hold objn objects of objsize size with objealign alignment
[in]msgbufpointer to the buffer of messages, it must be able to hold objn messages
Function Class:Initializer, this function just initializes an object and can be invoked before the kernel is initialized.

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().

Here is the call graph for this function:

static void chFifoObjectInit ( objects_fifo_t ofp,
size_t  objsize,
size_t  objn,
void *  objbuf,
msg_t *  msgbuf 
)
inlinestatic

Initializes a FIFO object.

Precondition
The messages size must be a multiple of the alignment requirement.
Parameters
[out]ofppointer to a objects_fifo_t structure
[in]objsizesize of objects
[in]objnnumber of objects available
[in]objbufpointer to the buffer of objects, it must be able to hold objn objects of objsize size with objealign alignment
[in]msgbufpointer to the buffer of messages, it must be able to hold objn messages
Function Class:Initializer, this function just initializes an object and can be invoked before the kernel is initialized.

Definition at line 155 of file chobjfifos.h.

References chFifoObjectInitAligned().

Here is the call graph for this function:

static void* chFifoTakeObjectI ( objects_fifo_t ofp)
inlinestatic

Allocates a free object.

Parameters
[in]ofppointer to a objects_fifo_t structure
Returns
The pointer to the allocated object.
Return values
NULLif an object is not immediately available.
Function Class:This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.

Definition at line 173 of file chobjfifos.h.

References chGuardedPoolAllocI(), and ch_objects_fifo::free.

Here is the call graph for this function:

static void* chFifoTakeObjectTimeoutS ( objects_fifo_t ofp,
sysinterval_t  timeout 
)
inlinestatic

Allocates a free object.

Parameters
[in]ofppointer to a objects_fifo_t structure
[in]timeoutthe number of ticks before the operation timeouts, the following special values are allowed:
  • TIME_IMMEDIATE immediate timeout.
  • TIME_INFINITE no timeout.
Returns
The pointer to the allocated object.
Return values
NULLif an object is not available within the specified timeout.
Function Class:This is an S-Class API, this function can be invoked from within a system lock zone by threads only.

Definition at line 193 of file chobjfifos.h.

References chGuardedPoolAllocTimeoutS(), and ch_objects_fifo::free.

Here is the call graph for this function:

static void* chFifoTakeObjectTimeout ( objects_fifo_t ofp,
sysinterval_t  timeout 
)
inlinestatic

Allocates a free object.

Parameters
[in]ofppointer to a objects_fifo_t structure
[in]timeoutthe number of ticks before the operation timeouts, the following special values are allowed:
  • TIME_IMMEDIATE immediate timeout.
  • TIME_INFINITE no timeout.
Returns
The pointer to the allocated object.
Return values
NULLif an object is not available within the specified timeout.
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 214 of file chobjfifos.h.

References chGuardedPoolAllocTimeout(), and ch_objects_fifo::free.

Here is the call graph for this function:

static void chFifoReturnObjectI ( objects_fifo_t ofp,
void *  objp 
)
inlinestatic

Releases a fetched object.

Parameters
[in]ofppointer to a objects_fifo_t structure
[in]objppointer to the object to be released
Function Class:This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.

Definition at line 228 of file chobjfifos.h.

References chGuardedPoolFreeI(), and ch_objects_fifo::free.

Here is the call graph for this function:

static void chFifoReturnObjectS ( objects_fifo_t ofp,
void *  objp 
)
inlinestatic

Releases a fetched object.

Parameters
[in]ofppointer to a objects_fifo_t structure
[in]objppointer to the object to be released
Function Class:This is an S-Class API, this function can be invoked from within a system lock zone by threads only.

Definition at line 242 of file chobjfifos.h.

References chGuardedPoolFreeS(), and ch_objects_fifo::free.

Here is the call graph for this function:

static void chFifoReturnObject ( objects_fifo_t ofp,
void *  objp 
)
inlinestatic

Releases a fetched object.

Parameters
[in]ofppointer to a objects_fifo_t structure
[in]objppointer to the object to be released
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 256 of file chobjfifos.h.

References chGuardedPoolFree(), and ch_objects_fifo::free.

Here is the call graph for this function:

static void chFifoSendObjectI ( objects_fifo_t ofp,
void *  objp 
)
inlinestatic

Posts an object.

Note
By design the object can be always immediately posted.
Parameters
[in]ofppointer to a objects_fifo_t structure
[in]objppointer to the object to be posted
Function Class:This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.

Definition at line 271 of file chobjfifos.h.

References chDbgAssert, chMBPostI(), ch_objects_fifo::mbx, and MSG_OK.

Here is the call graph for this function:

static void chFifoSendObjectS ( objects_fifo_t ofp,
void *  objp 
)
inlinestatic

Posts an object.

Note
By design the object can be always immediately posted.
Parameters
[in]ofppointer to a objects_fifo_t structure
[in]objppointer to the object to be posted
Function Class:This is an S-Class API, this function can be invoked from within a system lock zone by threads only.

Definition at line 288 of file chobjfifos.h.

References chDbgAssert, chMBPostTimeoutS(), ch_objects_fifo::mbx, MSG_OK, and TIME_IMMEDIATE.

Here is the call graph for this function:

static void chFifoSendObject ( objects_fifo_t ofp,
void *  objp 
)
inlinestatic

Posts an object.

Note
By design the object can be always immediately posted.
Parameters
[in]ofppointer to a objects_fifo_t structure
[in]objppointer to the object to be released
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 305 of file chobjfifos.h.

References chDbgAssert, chMBPostTimeout(), ch_objects_fifo::mbx, MSG_OK, and TIME_IMMEDIATE.

Here is the call graph for this function:

static void chFifoSendObjectAheadI ( objects_fifo_t ofp,
void *  objp 
)
inlinestatic

Posts an high priority object.

Note
By design the object can be always immediately posted.
Parameters
[in]ofppointer to a objects_fifo_t structure
[in]objppointer to the object to be posted
Function Class:This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.

Definition at line 322 of file chobjfifos.h.

References chDbgAssert, chMBPostAheadI(), ch_objects_fifo::mbx, and MSG_OK.

Here is the call graph for this function:

static void chFifoSendObjectAheadS ( objects_fifo_t ofp,
void *  objp 
)
inlinestatic

Posts an high priority object.

Note
By design the object can be always immediately posted.
Parameters
[in]ofppointer to a objects_fifo_t structure
[in]objppointer to the object to be posted
Function Class:This is an S-Class API, this function can be invoked from within a system lock zone by threads only.

Definition at line 339 of file chobjfifos.h.

References chDbgAssert, chMBPostAheadTimeoutS(), ch_objects_fifo::mbx, MSG_OK, and TIME_IMMEDIATE.

Here is the call graph for this function:

static void chFifoSendObjectAhead ( objects_fifo_t ofp,
void *  objp 
)
inlinestatic

Posts an high priority object.

Note
By design the object can be always immediately posted.
Parameters
[in]ofppointer to a objects_fifo_t structure
[in]objppointer to the object to be released
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 356 of file chobjfifos.h.

References chDbgAssert, chMBPostAheadTimeout(), ch_objects_fifo::mbx, MSG_OK, and TIME_IMMEDIATE.

Here is the call graph for this function:

static msg_t chFifoReceiveObjectI ( objects_fifo_t ofp,
void **  objpp 
)
inlinestatic

Fetches an object.

Parameters
[in]ofppointer to a objects_fifo_t structure
[in]objpppointer to the fetched object reference
Returns
The operation status.
Return values
MSG_OKif an object has been correctly fetched.
MSG_TIMEOUTif the FIFO is empty and a message cannot be fetched.
Function Class:This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.

Definition at line 375 of file chobjfifos.h.

References chMBFetchI(), and ch_objects_fifo::mbx.

Here is the call graph for this function:

static msg_t chFifoReceiveObjectTimeoutS ( objects_fifo_t ofp,
void **  objpp,
sysinterval_t  timeout 
)
inlinestatic

Fetches an object.

Parameters
[in]ofppointer to a objects_fifo_t structure
[in]objpppointer to the fetched object reference
[in]timeoutthe number of ticks before the operation timeouts, the following special values are allowed:
  • TIME_IMMEDIATE immediate timeout.
  • TIME_INFINITE no timeout.
Returns
The operation status.
Return values
MSG_OKif an object has been correctly fetched.
MSG_TIMEOUTif the operation has timed out.
Function Class:This is an S-Class API, this function can be invoked from within a system lock zone by threads only.

Definition at line 397 of file chobjfifos.h.

References chMBFetchTimeoutS(), and ch_objects_fifo::mbx.

Here is the call graph for this function:

static msg_t chFifoReceiveObjectTimeout ( objects_fifo_t ofp,
void **  objpp,
sysinterval_t  timeout 
)
inlinestatic

Fetches an object.

Parameters
[in]ofppointer to a objects_fifo_t structure
[in]objpppointer to the fetched object reference
[in]timeoutthe number of ticks before the operation timeouts, the following special values are allowed:
  • TIME_IMMEDIATE immediate timeout.
  • TIME_INFINITE no timeout.
Returns
The operation status.
Return values
MSG_OKif an object has been correctly fetched.
MSG_TIMEOUTif the operation has timed out.
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 420 of file chobjfifos.h.

References chMBFetchTimeout(), and ch_objects_fifo::mbx.

Here is the call graph for this function: