|
QP/C
|
QActive_defer() and QActive_recall() implementation. More...
Go to the source code of this file.
Functions | |
| void | QActive_defer (QActive *const me, QEQueue *const eq, QEvt const *const e) |
| Defer an event to a given separate event queue. | |
| uint8_t | QActive_recall (QActive *const me, QEQueue *const eq) |
| Recall a deferred event from a given event queue. | |
QActive_defer() and QActive_recall() implementation.
Definition in file qa_defer.c.
| void QActive_defer | ( | QActive *const | me, |
| QEQueue *const | eq, | ||
| QEvt const *const | e | ||
| ) |
Defer an event to a given separate event queue.
This function is part of the event deferral support. An active object uses this function to defer an event e to the QF-supported native event queue eq. QF correctly accounts for another outstanding reference to the event and will not recycle the event at the end of the RTC step. Later, the active object might recall one event at a time from the event queue.
An active object can use multiple event queues to defer events of different kinds.
Definition at line 47 of file qa_defer.c.
References QEQueue_postFIFO().
| uint8_t QActive_recall | ( | QActive *const | me, |
| QEQueue *const | eq | ||
| ) |
Recall a deferred event from a given event queue.
This function is part of the event deferral support. An active object uses this function to recall a deferred event from a given QF event queue. Recalling an event means that it is removed from the deferred event queue eq and posted (LIFO) to the event queue of the active object.
QActive_recall() returns 1 (TRUE) if an event has been recalled. Otherwise the function returns 0.
An active object can use multiple event queues to defer events of different kinds.
Definition at line 54 of file qa_defer.c.
References Q_ASSERT, QActive_postLIFO(), QEQueue_get(), QF_EVT_POOL_ID_, QF_EVT_REF_CTR_, and QF_EVT_REF_CTR_DEC_.
1.7.6.1