51 #include "qs_dummy.hpp"
56 #error "Source file included in a project NOT based on the QXK kernel"
61Q_DEFINE_THIS_MODULE(
"qxk_xthr")
66#if (QP_VERSION < 730U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
67#error qpcpp version 7.3.0 or higher required
79 std::uint_fast8_t
const tickRate) noexcept
83 m_state.act =
nullptr;
89 std::uint_fast8_t
const qsId)
99 std::uint_fast8_t
const qsId)
191 if (thr->
m_eQueue.m_frontEvt ==
nullptr) {
198 static_cast<std::uint_fast8_t
>(thr->
m_prio));
221 if (thr->
m_eQueue.m_frontEvt !=
nullptr) {
227 if (nFree <= thr->m_eQueue.m_end) {
322 m_timeEvt.sig =
static_cast<QSignal>(sig);
325 m_timeEvt.m_ctr =
static_cast<QTimeEvtCtr>(nTicks);
326 m_timeEvt.m_interval = 0U;
332 if (
static_cast<std::uint8_t
>(m_timeEvt.refCtr_ &
TE_IS_LINKED) == 0U)
334 std::uint_fast8_t
const tickRate =
335 static_cast<std::uint_fast8_t
>(m_timeEvt.refCtr_);
339 m_timeEvt.refCtr_ =
static_cast<std::uint8_t
>(
Active object class (based on the QHsm implementation strategy)
QACTIVE_EQUEUE_TYPE m_eQueue
static QActive * registry_[QF_MAX_ACTIVE+1U]
std::uint_fast8_t getPoolNum_() const noexcept
std::uint8_t volatile refCtr_
void update_(QPSet *const dis) const noexcept
void remove(std::uint_fast8_t const n) noexcept
void insert(std::uint_fast8_t const n) noexcept
static QTimeEvt timeEvtHead_[QF_MAX_TICK_RATE]
QTimeEvtCtr volatile m_ctr
eXtended (blocking) thread of the QXK preemptive kernel
static QEvt const * queueGet(QTimeEvtCtr const nTicks=QXTHREAD_NO_TIMEOUT) noexcept
bool teDisarm_() noexcept
static void timeout_(QActive *const act)
void dispatch(QEvt const *const e, std::uint_fast8_t const qsId) override
void init(void const *const e, std::uint_fast8_t const qsId) override
void block_() const noexcept
bool delayCancel() noexcept
void unblock_() const noexcept
void teArm_(enum_t const sig, QTimeEvtCtr const nTicks) noexcept
static bool delay(QTimeEvtCtr const nTicks) noexcept
QP::QActive *volatile curr
std::uint_fast8_t volatile lockHolder
constexpr std::uint8_t TE_IS_LINKED
void(*)(QXThread *const me) QXThreadHandler
std::uint32_t QTimeEvtCtr
constexpr QTimeEvtCtr QXTHREAD_NO_TIMEOUT
@ QS_QF_ACTIVE_GET_LAST
AO got an event and its queue is empty.
@ QS_QF_ACTIVE_GET
AO got an event and its queue is not empty.
#define Q_UNUSED_PAR(par_)
#define Q_STATE_CAST(handler_)
#define QF_CRIT_EXIT_NOP()
Internal (package scope) QP/C++ interface.
#define QXK_ISR_CONTEXT_()
Check if the code executes in the ISR context.
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_)
#define Q_ERROR_INCRIT(id_)
#define QXTHREAD_CAST_(ptr_)
#define QXK_PTR_CAST_(type_, ptr_)
std::uint_fast8_t QXK_sched_() noexcept
State object for the QP::QMsm class (QM State Machine).