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 uint_fast8_t
const poolNum =
QF_priv_.maxPool_;
72 uint8_t obj_name[9] =
"EvtPool?";
73 obj_name[7] = (uint8_t)((uint8_t)
'0' + poolNum + 1U);
74 QS_obj_dict_pre_(&
QF_priv_.ePool_[poolNum], (
char const *)obj_name);
84 uint_fast16_t
const max_size =
98 && (0U < poolNum) && (poolNum <=
QF_priv_.maxPool_));
100 uint_fast16_t
const min = (uint_fast16_t)
QF_priv_.ePool_[poolNum - 1U].nMin;
110 uint_fast16_t
const evtSize,
111 uint_fast16_t
const margin,
115 uint8_t poolNum = 0U;
116 for (; poolNum <
QF_priv_.maxPool_; ++poolNum) {
138 (uint_fast8_t)QS_EP_ID + poolNum);
144 if (e != (
QEvt *)0) {
150 QS_BEGIN_PRE(QS_QF_NEW, (uint_fast8_t)QS_EP_ID + poolNum)
166 (uint_fast8_t)QS_EP_ID + poolNum)
188 uint8_t
const poolNum = e->
poolNum_;
195 (uint_fast8_t)QS_EP_ID + poolNum)
209 (uint_fast8_t)QS_EP_ID + poolNum)
223 (uint_fast8_t)QS_EP_ID + poolNum);
238 QEvt const *
const e,
239 void const *
const evtRef)
250 uint_fast8_t
const poolNum = e->
poolNum_;
254 && (evtRef == (
void *)0));
260 (uint_fast8_t)QS_EP_ID + poolNum)
277 QEvt const *
const e = (
QEvt const *)evtRef;
281 uint_fast8_t
const poolNum = e->
poolNum_;
283 (uint_fast8_t)QS_EP_ID + poolNum)
292#if (QF_MAX_EPOOL > 0U)
void QF_gc(QEvt const *const e)
Recycle a mutable (mutable) event.
uint_fast16_t QF_poolGetMaxBlockSize(void)
Obtain the block size of any registered event pools.
uint_fast16_t QF_getPoolMin(uint_fast8_t const poolNum)
Obtain the minimum of free entries of the given event pool.
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 QF_EPOOL_EVENT_SIZE_(p_)
#define QF_EPOOL_PUT_(p_, e_, qsId_)
#define QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_)
#define QF_EPOOL_GET_(p_, e_, m_, qsId_)
#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...
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)
Internal (package scope) QP/C interface.
QS/C dummy public interface.
#define QS_2U8_PRE(data1_, data2_)
#define QS_EVS_PRE(size_)
#define QS_BEGIN_PRE(rec_, qsId_)
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)
QSignal sig
Signal of the event (see Event Signal)
uint8_t volatile refCtr_
Event reference counter.
uint8_t poolNum_
Event pool number of this event.