51 #include "qs_dummy.hpp"
56 #error "Source file included in a project NOT based on the QXK kernel"
61Q_DEFINE_THIS_MODULE(
"qxk")
66#if (QP_VERSION < 730U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
67#error qpcpp version 7.3.0 or higher required
91 static_cast<std::uint8_t
>(ceiling));
117 std::uint8_t
const prevCeil =
static_cast<std::uint8_t
>(stat >> 8U);
154 if (curr ==
nullptr) {
190 p =
static_cast<std::uint_fast8_t
>(
204 if (curr ==
nullptr) {
243 #if (defined QF_ON_CONTEXT_SW) || (defined Q_SPY)
251 std::uint_fast8_t p = next->
getPrio();
264 #if (QF_MAX_EPOOL > 0U)
305 #if (defined QF_ON_CONTEXT_SW) || (defined Q_SPY)
328 #if (defined QF_ON_CONTEXT_SW) || (defined Q_SPY)
340 std::uint_fast8_t
const prev_prio = (
QXK_priv_.
prev !=
nullptr)
343 if (next !=
nullptr) {
344 std::uint_fast8_t
const next_prio = next->
getPrio();
347 QS_2U8_PRE_(next_prio, prev_prio);
353 QS_U8_PRE_(prev_prio);
358 #ifdef QF_ON_CONTEXT_SW
373 && (thr !=
nullptr));
376 std::uint_fast8_t
const p =
377 static_cast<std::uint_fast8_t
>(thr->
getPrio());
413 idle_ao[((
sizeof(QActive) +
sizeof(
void*)) - 1U) /
sizeof(
void*)]
418 reinterpret_cast<QActive const*
>(idle_ao));
486 QEvt
const * *
const qSto,
487 std::uint_fast16_t
const qLen,
489 std::uint_fast16_t
const stkSize,
490 void const *
const par)
495 && ((prioSpec & 0xFF00U) == 0U));
498 m_prio =
static_cast<std::uint8_t
>(prioSpec & 0xFFU);
502 if (stkSto ==
nullptr) {
523 if (qSto !=
nullptr) {
Active object class (based on the QHsm implementation strategy)
QACTIVE_OS_OBJ_TYPE const & getOsObject() const noexcept
QEvt const * get_() noexcept
QACTIVE_EQUEUE_TYPE m_eQueue
void init(void const *const e, std::uint_fast8_t const qs_id) override
void start(QPrioSpec const prioSpec, QEvt const **const qSto, std::uint_fast16_t const qLen, void *const stkSto, std::uint_fast16_t const stkSize, void const *const par)
void dispatch(QEvt const *const e, std::uint_fast8_t const qs_id) override
std::uint_fast8_t getPrio() const noexcept
static QActive * registry_[QF_MAX_ACTIVE+1U]
QACTIVE_EQUEUE_TYPE const & getEQueue() const noexcept
void register_() noexcept
QACTIVE_OS_OBJ_TYPE m_osObject
bool isEmpty() const noexcept
void update_(QPSet *const dis) const noexcept
bool verify_(QPSet const *const dis) const noexcept
void remove(std::uint_fast8_t const n) noexcept
std::uint_fast8_t findMax() const noexcept
void insert(std::uint_fast8_t const n) noexcept
bool hasElement(std::uint_fast8_t const n) const noexcept
eXtended (blocking) thread of the QXK preemptive kernel
Private attributes of the QXK kernel.
QP::QActive *volatile next
QP::QActive *volatile prev
std::uint_fast8_t volatile lockCeil
QP::QActive *volatile curr
std::uint_fast8_t volatile actPrio
std::uint_fast8_t volatile lockHolder
void bzero_(void *const start, std::uint_fast16_t const len) noexcept
void gc(QEvt const *const e) noexcept
QSchedStatus schedLock(std::uint_fast8_t const ceiling) noexcept
QP::QActive * current() noexcept
void schedUnlock(QSchedStatus const stat) noexcept
std::uint_fast8_t QSchedStatus
@ 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
void QF_onContextSw(QP::QActive *prev, QP::QActive *next)
Internal (package scope) QP/C++ interface.
#define QF_CONST_CAST_(type_, ptr_)
#define QXK_ISR_CONTEXT_()
Check if the code executes in the ISR context.
#define QXK_CONTEXT_SWITCH_()
Trigger context switch (used internally in QXK only)
#define QF_INT_DISABLE()
Disable interrupts.
#define QF_INT_ENABLE()
Enable interrupts.
#define QS_SIG_DICTIONARY(sig_, obj_)
QS/C++ package-scope interface.
QS/C++ port to a 32-bit CPU, generic C++ compiler.
QP Functional Safety (FuSa) Subsystem.
#define Q_ASSERT_INCRIT(id_, expr_)
#define Q_REQUIRE_INCRIT(id_, expr_)
std::uint_fast8_t QXK_sched_() noexcept
void QXK_activate_() noexcept
void QXK_contextSw_(QP::QActive *const next)
void QXK_activate_() noexcept
#define QXTHREAD_CAST_(ptr_)
#define QXK_PTR_CAST_(type_, ptr_)
std::uint_fast8_t QXK_sched_() noexcept