QP natvie, platform-independent, thread-safe event queue interface. More...
Go to the source code of this file.
Data Structures | |
struct | QEQueue |
Typedefs | |
typedef uint8_t | QEQueueCtr |
Functions | |
void | QEQueue_init (QEQueue *const me, QEvt const **const qSto, uint_fast16_t const qLen) |
bool | QEQueue_post (QEQueue *const me, QEvt const *const e, uint_fast16_t const margin, uint_fast8_t const qs_id) |
void | QEQueue_postLIFO (QEQueue *const me, QEvt const *const e, uint_fast8_t const qs_id) |
QEvt const * | QEQueue_get (QEQueue *const me, uint_fast8_t const qs_id) |
static QEQueueCtr | QEQueue_getNFree (QEQueue *const me) |
static QEQueueCtr | QEQueue_getNMin (QEQueue *const me) |
static bool | QEQueue_isEmpty (QEQueue *const me) |
This header file must be included in all QF ports that use native QF event queue for active objects. Also, this file needs to be included in the QP/C library when the application uses QActive_defer()/ QActive_recall(). Finally, this file is also needed when the "raw" thread-safe queues are used for communication between active objects and non-framework entities, such as ISRs, device drivers, or legacy code.
Definition in file qequeue.h.
typedef uint8_t QEQueueCtr |
Initialize the native QF event queue
bool QEQueue_post | ( | QEQueue *const | me, |
QEvt const *const | e, | ||
uint_fast16_t const | margin, | ||
uint_fast8_t const | qs_id | ||
) |
Post an event to the "raw" thread-safe event queue (FIFO).
Post an event to the "raw" thread-safe event queue (LIFO).
Obtain an event from the "raw" thread-safe queue.
|
inlinestatic |
"raw" thread-safe QF event queue operation for obtaining the number of free entries still available in the queue.
This operation needs to be used with caution because the number of free entries can change unexpectedly. The main intent for using this operation is in conjunction with event deferral. In this case the queue is accessed only from a single thread (by a single AO), so the number of free entries cannot change unexpectedly.
[in] | me | pointer (see oop) |
|
inlinestatic |
"raw" thread-safe QF event queue operation for obtaining the minimum number of free entries ever in the queue (a.k.a. "low-watermark").
This operation needs to be used with caution because the "low-watermark" can change unexpectedly. The main intent for using this operation is to get an idea of queue usage to size the queue adequately.
[in] | me | pointer (see oop) |
|
inlinestatic |
"raw" thread-safe QF event queue operation to find out if the queue is empty.
This operation needs to be used with caution because the queue status can change unexpectedly. The main intent for using this operation is in conjunction with event deferral. In this case the queue is accessed only from a single thread (by a single AO), so no other entity can post events to the queue.
[in] | me_ | pointer (see oop) |