48 #error "Source file included in a project NOT based on the QV kernel"
51Q_DEFINE_THIS_MODULE(
"qv")
55#if (QP_VERSION < 730U) || (QP_VERSION != ((QP_RELEASE^4294967295U)%0x2710U))
56#error qpc version 7.3.0 or higher required
66void QV_schedDisable(uint_fast8_t
const ceiling) {
72 == (uint_fast8_t)(~QV_priv_.schedCeil_dis));
74 if (ceiling > QV_priv_.schedCeil) {
83 QV_priv_.schedCeil = ceiling;
85 QV_priv_.schedCeil_dis = (uint_fast8_t)(~ceiling);
94void QV_schedEnable(
void) {
100 == (uint_fast8_t)(~QV_priv_.schedCeil_dis));
102 if (QV_priv_.schedCeil != 0U) {
110 QV_priv_.schedCeil = 0U;
112 QV_priv_.schedCeil_dis = (uint_fast8_t)(~0U);
126 QF_bzero_(&QV_priv_,
sizeof(QV_priv_));
127 QF_bzero_(&QActive_registry_[0],
sizeof(QActive_registry_));
130 QPSet_update_(&QV_priv_.readySet, &QV_priv_.readySet_dis);
131 QV_priv_.schedCeil_dis = (uint_fast8_t)(~0U);
155 QS_beginRec_((uint_fast8_t)QS_QF_RUN);
170 #if (defined QF_ON_CONTEXT_SW) || (defined Q_SPY)
171 uint_fast8_t pprev = 0U;
173 #ifdef QF_ON_CONTEXT_SW
184 &QV_priv_.readySet_dis));
187 == (uint_fast8_t)(~QV_priv_.schedCeil_dis));
190 uint_fast8_t
const p = (QPSet_notEmpty(&QV_priv_.readySet)
191 ? QPSet_findMax(&QV_priv_.readySet)
194 if (p > QV_priv_.schedCeil) {
195 QActive *
const a = QActive_registry_[p];
197 #if (defined QF_ON_CONTEXT_SW) || (defined Q_SPY)
204 #ifdef QF_ON_CONTEXT_SW
205 QF_onContextSw(((pprev != 0U)
206 ? QActive_registry_[pprev]
216 QEvt const *
const e = QActive_get_(a);
221 #if (QF_MAX_EPOOL > 0U)
228 QPSet_remove(&QV_priv_.readySet, p);
230 QPSet_update_(&QV_priv_.readySet, &QV_priv_.readySet_dis);
235 #if (defined QF_ON_CONTEXT_SW) || (defined Q_SPY)
242 #ifdef QF_ON_CONTEXT_SW
243 QF_onContextSw(QActive_registry_[pprev], (
QActive *)0);
279 uint_fast16_t
const qLen,
281 uint_fast16_t
const stkSize,
282 void const *
const par)
292 me->
prio = (uint8_t)(prioSpec & 0xFFU);
294 QActive_register_(me);
296 QEQueue_init(&me->
eQueue, qSto, qLen);
#define Q_UNUSED_PAR(par_)
Helper macro to clearly mark unused parameters of functions.
QEvt const * QEvtPtr
Pointer to const event instances passed around in QP Framework.
int int_t
Alias for assertion-ID numbers in QP assertions and return from QF_run()
uint16_t QPrioSpec
Priority specification for Active Objects in QP.
Internal (package scope) QP/C interface.
#define QF_INT_DISABLE()
Disable interrupts.
#define QF_INT_ENABLE()
Enable interrupts.
#define QS_2U8_PRE(data1_, data2_)
#define QS_BEGIN_PRE(rec_, qsId_)
QP Functional Safety (FuSa) Subsystem.
#define Q_INVARIANT_INCRIT(id_, expr_)
#define Q_REQUIRE_INCRIT(id_, expr_)
Active object class (based on the QHsm implementation strategy)
QACTIVE_EQUEUE_TYPE eQueue
Port-dependent event-queue type (often QEQueue)
uint8_t prio
QF-priority [1..QF_MAX_ACTIVE] of this AO.
uint8_t pthre
Preemption-threshold [1..QF_MAX_ACTIVE] of this AO.
struct QAsmVtable const * vptr
Virtual pointer inherited by all QAsm subclasses (see also Object Orientation)
void(* init)(QAsm *const me, void const *const e, uint_fast8_t const qsId)
Virtual function to take the top-most initial transition in the state machine.
void(* dispatch)(QAsm *const me, QEvt const *const e, uint_fast8_t const qsId)
Virtual function to dispatch an event to the state machine.
Private attributes of the QV kernel.