46Q_DEFINE_THIS_MODULE(
"qf_qeq")
50#if (QP_VERSION < 730U) || (QP_VERSION != ((QP_RELEASE^4294967295U)%0x2710U))
51#error qpc version 7.3.0 or higher required
60void QEQueue_init(
QEQueue *
const me,
61 struct QEvt const * *
const qSto,
62 uint_fast16_t
const qLen)
68 #if (QF_EQUEUE_CTR_SIZE == 1U)
96 struct QEvt const *
const e,
97 uint_fast16_t
const margin,
98 uint_fast8_t
const qsId)
130 if (QEvt_getPoolNum_(e) != 0U) {
140 if (me->
nMin > tmp) {
211 struct QEvt const *
const e,
212 uint_fast8_t
const qsId)
241 if (QEvt_getPoolNum_(e) != 0U) {
251 if (me->
nMin > tmp) {
275 if (frontEvt != (
QEvt *)0) {
282 if (tmp == me->
end) {
289 me->
ring[tmp] = frontEvt;
299 uint_fast8_t
const qsId)
315 if (e != (
QEvt *)0) {
330 if (tmp <= me->end) {
341 QEvt const *
const frontEvt = me->
ring[tmp];
#define Q_UNUSED_PAR(par_)
Helper macro to clearly mark unused parameters of functions.
#define QF_NO_MARGIN
Special value of margin that causes asserting failure in case event allocation or event posting fails...
Internal (package scope) QP/C interface.
#define Q_PTR2UINT_CAST_(ptr_)
#define QS_2U8_PRE(data1_, data2_)
#define QS_TEST_PROBE_DEF(fun_)
#define QS_TEST_PROBE_ID(id_, code_)
#define QS_BEGIN_PRE(rec_, qsId_)
QP Functional Safety (FuSa) Subsystem.
#define Q_ASSERT_INCRIT(id_, expr_)
#define Q_INVARIANT_INCRIT(id_, expr_)
#define Q_REQUIRE_INCRIT(id_, expr_)
QEQueueCtr volatile tail
Offset of where next event will be extracted from the buffer.
QEQueueCtr volatile head
Offset to where next event will be inserted into the buffer.
QEQueueCtr end
Offset of the end of the ring buffer from the start of the buffer.
QEQueueCtr nMin
Minimum number of free events ever in the ring buffer.
QEQueueCtr volatile nFree
Number of free events in the ring buffer.
struct QEvt const ** ring
Pointer to the start of the ring buffer.
struct QEvt const *volatile frontEvt
Pointer to event at the front of the queue.
QSignal sig
Signal of the event (see Event Signal)
uint8_t volatile refCtr_
Event reference counter.
static uint_fast8_t QEvt_getPoolNum_(QEvt const *const me)
Internal function to get the event pool-number of the given event.