104 std::uint_fast8_t
const tickRate = 0U)
noexcept;
106 void const *
const e,
107 std::uint_fast8_t
const qs_id)
override;
108 void init(std::uint_fast8_t
const qs_id)
override {
109 this->init(
nullptr, qs_id);
112 QEvt const *
const e,
113 std::uint_fast8_t
const qs_id)
override;
117 static bool delay(
QTimeEvtCtr const nTicks)
noexcept;
118 bool delayCancel() noexcept;
119 static
QEvt const * queueGet(
QTimeEvtCtr const nTicks = QXTHREAD_NO_TIMEOUT) noexcept;
122 void block_() const noexcept;
123 void unblock_() const noexcept;
124 static
void timeout_(
QActive * const act);
128 bool teDisarm_() noexcept;
132 std::uint_fast16_t const stkSize) noexcept;
150 std::uint_fast8_t
const count,
151 std::uint_fast8_t
const max_count = 0xFFU) noexcept;
152 bool wait(
QTimeEvtCtr const nTicks = QXTHREAD_NO_TIMEOUT) noexcept;
153 bool tryWait() noexcept;
154 bool signal() noexcept;
171 void init(
QPrioSpec const prioSpec)
noexcept;
172 bool lock(
QTimeEvtCtr const nTicks = QXTHREAD_NO_TIMEOUT)
noexcept;
173 bool tryLock() noexcept;
174 void unlock() noexcept;
223#define QF_SCHED_STAT_ QSchedStatus lockStat_;
226#define QF_SCHED_LOCK_(ceil_) do { \
227 if (QXK_ISR_CONTEXT_()) { \
230 lockStat_ = QXK::schedLock((ceil_)); \
235#define QF_SCHED_UNLOCK_() do { \
236 if (lockStat_ != 0xFFU) { \
237 QXK::schedUnlock(lockStat_); \
243#define QACTIVE_EQUEUE_WAIT_(me_) \
244 Q_ASSERT_INCRIT(310, (me_)->m_eQueue.m_frontEvt != nullptr)
249#define QACTIVE_EQUEUE_SIGNAL_(me_) do { \
250 QXK_priv_.readySet.insert( \
251 static_cast<std::uint_fast8_t>((me_)->m_prio)); \
252 QXK_priv_.readySet.update_(&QXK_priv_.readySet_dis); \
253 if (!QXK_ISR_CONTEXT_()) { \
254 if (QXK_sched_() != 0U) { \
264#define QACTIVE_EQUEUE_SIGNAL_(me_) do { \
265 QXK_priv_.readySet.insert( \
266 static_cast<std::uint_fast8_t>((me_)->m_prio)); \
267 if (!QXK_ISR_CONTEXT_()) { \
268 if (QXK_sched_() != 0U) { \
277#define QXTHREAD_EQUEUE_SIGNAL_(me_) do { \
278 if ((me_)->m_temp.obj == QXK_PTR_CAST_(QMState*, &(me_)->m_eQueue)) { \
279 static_cast<void>(QXTHREAD_CAST_(me_)->teDisarm_()); \
280 QXK_priv_.readySet.insert( \
281 static_cast<std::uint_fast8_t>((me_)->m_prio)); \
282 QXK_priv_.readySet.update_(&QXK_priv_.readySet_dis); \
283 if (!QXK_ISR_CONTEXT_()) { \
284 static_cast<void>(QXK_sched_()); \
292#define QXTHREAD_EQUEUE_SIGNAL_(me_) do { \
293 if ((me_)->m_temp.obj == QXK_PTR_CAST_(QMState*, &(me_)->m_eQueue)) { \
294 static_cast<void>(QXTHREAD_CAST_(me_)->teDisarm_()); \
295 QXK_priv_.readySet.insert( \
296 static_cast<std::uint_fast8_t>((me_)->m_prio)); \
297 if (!QXK_ISR_CONTEXT_()) { \
298 static_cast<void>(QXK_sched_()); \
305#define QXTHREAD_CAST_(ptr_) (static_cast<QP::QXThread *>(ptr_))
308#define QXK_PTR_CAST_(type_, ptr_) (reinterpret_cast<type_>(ptr_))
314#define QF_EPOOL_TYPE_ QMPool
317#define QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_) \
318 (p_).init((poolSto_), (poolSize_), (evtSize_))
321#define QF_EPOOL_EVENT_SIZE_(p_) ((p_).getBlockSize())
324#define QF_EPOOL_GET_(p_, e_, m_, qs_id_) \
325 ((e_) = static_cast<QEvt *>((p_).get((m_), (qs_id_))))
328#define QF_EPOOL_PUT_(p_, e_, qs_id_) ((p_).put((e_), (qs_id_)))
Active object class (based on the QHsm implementation strategy)
Set of Active Objects of up to QF_MAX_ACTIVE elements.
Blocking Mutex of the QXK preemptive kernel.
Counting Semaphore of the QXK preemptive kernel.
eXtended (blocking) thread of the QXK preemptive kernel
void init(std::uint_fast8_t const qs_id) override
QTimeEvt const * getTimeEvt() const noexcept
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
QSchedStatus schedLock(std::uint_fast8_t const ceiling) noexcept
QP::QActive * current() noexcept
void schedUnlock(QSchedStatus const stat) noexcept
void(*)(QXThread *const me) QXThreadHandler
std::uint32_t QTimeEvtCtr
std::uint_fast8_t QSchedStatus
constexpr QTimeEvtCtr QXTHREAD_NO_TIMEOUT
void QXK_activate_() noexcept
void QXK_contextSw_(QP::QActive *const next)
std::uint_fast8_t QXK_sched_() noexcept