40#if (QF_MAX_EPOOL > 0U)
42Q_DEFINE_THIS_MODULE(
"qf_dyn")
48 uint_fast32_t const poolSize,
49 uint_fast16_t const evtSize)
51 uint8_t
const poolNum =
QF_priv_.maxPool_;
77 uint8_t obj_name[9] =
"EvtPool?";
79 obj_name[7] = (uint8_t)((uint8_t)
'0' +
QF_priv_.maxPool_);
80 QS_obj_dict_pre_(&
QF_priv_.ePool_[poolNum], (
char const *)obj_name);
91 uint8_t
const maxPool =
QF_priv_.maxPool_;
97 uint16_t
const maxSize =
107uint16_t QF_getPoolUse(uint_fast8_t
const poolNum) {
112 uint8_t
const maxPool = QF_priv_.maxPool_;
127 for (uint_fast8_t pool = QF_priv_.maxPool_; pool > 0U; --pool) {
142uint16_t QF_getPoolFree(uint_fast8_t
const poolNum) {
147 uint8_t
const maxPool = QF_priv_.maxPool_;
155 uint16_t
const nFree =
QF_EPOOL_FREE_(&QF_priv_.ePool_[poolNum - 1U]);
166uint16_t QF_getPoolMin(uint_fast8_t
const poolNum) {
171 uint8_t
const maxPool = QF_priv_.maxPool_;
180 uint16_t
const nMin =
QF_EPOOL_MIN_(&QF_priv_.ePool_[poolNum - 1U]);
191 uint_fast16_t
const evtSize,
192 uint_fast16_t
const margin,
198 uint8_t
const maxPool =
QF_priv_.maxPool_;
204 uint8_t poolNum = 0U;
205 for (; poolNum < maxPool; ++poolNum) {
231 if (e != (
QEvt *)0) {
275 uint8_t
const poolNum = (uint8_t)e->
poolNum_;
292 uint8_t
const maxPool =
QF_priv_.maxPool_;
326 QEvt const *
const e,
327 void const *
const evtRef)
346 uint8_t
const poolNum = (uint8_t)e->
poolNum_;
371 QEvt const *
const e = (
QEvt const *)evtRef;
377 uint8_t
const poolNum = (uint8_t)e->
poolNum_;
388#if (QF_MAX_EPOOL > 0U)
void QF_poolInit(void *const poolSto, uint_fast32_t const poolSize, uint_fast16_t const evtSize)
Event pool initialization for dynamic allocation of events.
uint16_t QF_poolGetMaxBlockSize(void)
Obtain the block size of any registered event pools.
void QF_gc(QEvt const *const e)
Recycle a mutable (mutable) event.
QEvt * QF_newX_(uint_fast16_t const evtSize, uint_fast16_t const margin, enum_t const sig)
Internal QF implementation of creating new mutable (dynamic) event.
void QF_deleteRef_(void const *const evtRef)
Internal QF implementation of deleting event reference.
QEvt const * QF_newRef_(QEvt const *const e, void const *const evtRef)
Internal QF implementation of creating new event reference.
#define Q_UNUSED_PAR(par_)
Helper macro to 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...
uint16_t QSignal
The signal of event QEvt.
#define QF_MAX_ACTIVE
Maximum # Active Objects in the system (1..64).
#define QF_MAX_EPOOL
Maximum # event pools in the system (0..15).
QP/C Framework in C internal (package-scope) interface.
#define QF_EPOOL_FREE_(ePool_)
Port-specific event pool # free events operation (for internal use in QF only).
#define QF_EPOOL_MIN_(ePool_)
Port-specific event pool minimum # events since initialization (for internal use in QF only).
#define QF_EPOOL_EVENT_SIZE_(p_)
Port-specific event pool block-size() operation (for internal use in QF only).
#define QF_EPOOL_PUT_(p_, e_, qsId_)
Port-specific event pool put() operation (for internal use in QF only).
#define QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_)
Port-specific event pool initialization (for internal use in QF only).
#define QF_EPOOL_USE_(ePool_)
Port-specific event pool # used events operation (for internal use in QF only).
#define QF_EPOOL_GET_(p_, e_, m_, qsId_)
Port-specific event pool get() operation (for internal use in QF only).
@ QS_QF_DELETE_REF
an event reference is about to be deleted
@ QS_QF_GC_ATTEMPT
garbage collection attempt
@ QS_QF_GC
garbage collection
@ QS_QF_NEW_ATTEMPT
an attempt to allocate an event failed
@ QS_QF_NEW_REF
new event reference was created
@ QS_QF_NEW
new event was created
#define QS_CRIT_EXIT()
Internal macro for exiting a critical section.
#define QS_CRIT_ENTRY()
Internal macro for entering a critical section.
QS (QP/Spy software tracing) internal (package-scope) interface.
#define QS_SIG_PRE(sig_)
Output pre-formatted event signal data element.
#define QS_2U8_PRE(data1_, data2_)
Output two pre-formatted unsigned 8-bit integer data elements.
#define QS_EVS_PRE(size_)
Output pre-formatted event queue size data element.
#define QS_END_PRE()
Pre-formatted QS trace record end.
#define QS_BEGIN_PRE(rec_, qsId_)
Pre-formatted QS trace record begin.
QP Functional Safety (FuSa) Subsystem.
#define Q_ASSERT_INCRIT(id_, expr_)
General-purpose assertion with user-specified ID number (in critical section).
#define Q_REQUIRE_INCRIT(id_, expr_)
Assertion for checking a precondition (in critical section).
uint32_t refCtr_
Event reference counter.
uint32_t poolNum_
Event pool number of this event.
uint32_t sig
Event signal (see Event Signal).