51 #define QF_EQUEUE_TYPE QEQueue
56 #define QF_OS_OBJECT_TYPE void*
59 #define QF_THREAD_TYPE void*
62 #define QXK_TLS(type_) (static_cast<type_>(QXK_current()->m_thread))
99 #ifdef QXK_ON_CONTEXT_SW
173 #ifndef QXK_ISR_CONTEXT_
178 #define QXK_ISR_CONTEXT_() \
179 (QXK_attr_.intNest != 0U)
186 #define QF_SCHED_STAT_ QSchedStatus lockStat_;
189 #define QF_SCHED_LOCK_(prio_) do { \
190 if (QXK_ISR_CONTEXT_()) { \
193 lockStat_ = QXK::schedLock((prio_)); \
198 #define QF_SCHED_UNLOCK_() do { \
199 if (lockStat_ != 0xFFU) { \
200 QXK::schedUnlock(lockStat_); \
205 #define QACTIVE_EQUEUE_WAIT_(me_) \
206 Q_ASSERT_ID(110, (me_)->m_eQueue.m_frontEvt != nullptr)
208 #define QACTIVE_EQUEUE_SIGNAL_(me_) do { \
209 QXK_attr_.readySet.insert( \
210 static_cast<std::uint_fast8_t>((me_)->m_dynPrio)); \
211 if (!QXK_ISR_CONTEXT_()) { \
212 if (QXK_sched_() != 0U) { \
219 #define QF_EPOOL_TYPE_ QMPool
220 #define QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_) \
221 (p_).init((poolSto_), (poolSize_), (evtSize_))
222 #define QF_EPOOL_EVENT_SIZE_(p_) ((p_).getBlockSize())
223 #define QF_EPOOL_GET_(p_, e_, m_, qs_id_) \
224 ((e_) = static_cast<QEvt *>((p_).get((m_), (qs_id_))))
225 #define QF_EPOOL_PUT_(p_, e_, qs_id_) ((p_).put((e_), (qs_id_)))
unsigned int uint_fast16_t
fast at-least 16-bit unsigned int
unsigned char uint8_t
exact-width 8-bit unsigned int
unsigned int uint_fast8_t
fast at-least 8-bit unsigned int
QActive active object (based on QP::QHsm implementation)
static QSchedStatus schedLock(std::uint_fast8_t const ceiling) noexcept
QXK selective scheduler lock.
static void schedUnlock(QSchedStatus const stat) noexcept
QXK selective scheduler unlock.
static void onIdle(void)
QXK idle callback (customized in BSPs for QXK)
namespace associated with the QP/C++ framework
std::uint_fast16_t QSchedStatus
The scheduler lock status.
platform-independent fast "raw" thread-safe event queue interface
platform-independent memory pool QP::QMPool interface.
platform-independent priority sets of 8 or 64 elements.
std::uint8_t volatile lockPrio
lock prio (0 == no-lock)
std::uint8_t volatile lockHolder
prio of the lock holder
QP::QActive * QXK_current(void) noexcept
return the currently executing active-object/thread
void QXK_onContextSw(QP::QActive *prev, QP::QActive *next)
QXK context switch callback (customized in BSPs for QXK)
QP::QActive * idleThread
pointer to the idle thread
void QXK_activate_(void)
QXK activator activates the next active object. The activated AO preempts.
std::uint_fast8_t QXK_sched_(void) noexcept
QXK scheduler finds the highest-priority thread ready to run.
QP::QActive *volatile next
next thread to execute
std::uint8_t volatile actPrio
prio of the active basic thread
QP::QPSet readySet
ready-set of all threads
QP::QActive *volatile curr
currently executing thread
QXK_Attr QXK_attr_
global attributes of the QXK kernel
std::uint8_t volatile intNest
ISR nesting level.
attributes of the QXK kernel
Priority Set of up to 32 elements */.