37 #include "qs_dummy.hpp"
42 #error Source file included in a project NOT based on the QV kernel
47Q_DEFINE_THIS_MODULE(
"qv")
60 if (ceiling >
priv_.schedCeil) {
66 static_cast<std::uint8_t
>(ceiling));
69 priv_.schedCeil = ceiling;
79 if (
priv_.schedCeil != 0U) {
113 QS::beginRec_(
static_cast<std::uint_fast8_t
>(
QS_QF_RUN));
121#if (defined QF_ON_CONTEXT_SW) || (defined Q_SPY)
122 std::uint_fast8_t pprev = 0U;
124#ifdef QF_ON_CONTEXT_SW
138 std::uint_fast8_t
const p = (
QV::priv_.readySet.notEmpty()
145#if (defined QF_ON_CONTEXT_SW) || (defined Q_SPY)
151 static_cast<std::uint8_t
>(pprev));
154#ifdef QF_ON_CONTEXT_SW
171#if (QF_MAX_EPOOL > 0U)
181#if (defined QF_ON_CONTEXT_SW) || (defined Q_SPY)
185 QS_U8_PRE(
static_cast<std::uint8_t
>(pprev));
188#ifdef QF_ON_CONTEXT_SW
215 std::uint_fast16_t
const qLen,
217 std::uint_fast16_t
const stkSize,
218 void const *
const par)
230 m_prio =
static_cast<std::uint8_t
>(prioSpec & 0xFFU);
Active object class (based on the QP::QHsm implementation strategy).
void register_() noexcept
Register this active object to be managed by the framework.
void dispatch(QEvt const *const e, std::uint_fast8_t const qsId) override
Virtual function to dispatch an event to the state machine.
QACTIVE_EQUEUE_TYPE m_eQueue
Port-dependent event-queue type (often QP::QEQueue).
QEvt const * get_() noexcept
Get an event from the event queue of an active object.
void start(QPrioSpec const prioSpec, QEvtPtr *const qSto, std::uint_fast16_t const qLen, void *const stkSto, std::uint_fast16_t const stkSize, void const *const par=nullptr)
Starts execution of an active object and registers the object with the framework.
std::uint8_t m_pthre
Preemption-threshold [1..QF_MAX_ACTIVE] of this AO.
std::uint8_t m_prio
QF-priority [1..QF_MAX_ACTIVE] of this AO.
QV non-preemptive kernel.
static void schedDisable(std::uint8_t const ceiling) noexcept
static void schedEnable() noexcept
QF Active Object Framework namespace.
void onCleanup()
Cleanup QF callback.
void gc(QEvt const *const e) noexcept
Recycle a mutable (mutable) event.
void init()
QF initialization.
int_t run()
Transfers control to QF to run the application.
void stop()
Invoked by the application layer to stop the QF framework and return control to the OS/Kernel (used i...
void onStartup()
Startup QF callback.
QP/C++ Framework namespace.
@ QS_SCHED_LOCK
scheduler was locked
@ QS_QF_RUN
QF_run() was entered.
@ QS_SCHED_NEXT
scheduler started next task
@ QS_SCHED_UNLOCK
scheduler was unlocked
@ QS_SCHED_IDLE
scheduler restored the idle task
QEvt const * QEvtPtr
Pointer to const event instances passed around in QP/C++ Framework.
std::array< QActive *, QF_MAX_ACTIVE+1U > QActive_registry_
Internal array of pointers to the registered Active Objects.
std::uint16_t QPrioSpec
Priority specification for Active Objects in QP.
int int_t
Alias for assertion-ID numbers in QP assertions and return from QP::QF::run().
#define Q_UNUSED_PAR(par_)
Helper macro to mark unused parameters of functions.
void QF_onContextSw(QP::QActive *prev, QP::QActive *next)
QP/C++ Framework in C++ internal (package-scope) interface.
#define QF_INT_DISABLE()
Port-specific interrupt disable.
#define QF_INT_ENABLE()
Port-specific interrupt enable.
QS (QP/Spy software tracing) internal (package-scope) interface.
#define QS_2U8_PRE(data1_, data2_)
Output two pre-formatted unsigned 8-bit integer data elements.
#define QS_U8_PRE(data_)
Output pre-formatted unsigned 8-bit integer 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_REQUIRE_INCRIT(id_, expr_)
Assertion for checking a precondition (in critical section).