QXK/C++ preemptive extended (blocking) kernel, platform-independent public interface. More...


Go to the source code of this file.
Data Structures | |
| struct | QXK_Attr |
| attributes of the QXK kernel More... | |
| class | QXK |
| QXK services. More... | |
Namespaces | |
| QP | |
| namespace associated with the QP/C++ framework | |
Macros | |
| #define | QF_EQUEUE_TYPE QEQueue |
| #define | QF_OS_OBJECT_TYPE void* |
| #define | QF_THREAD_TYPE void* |
| #define | QXK_TLS(type_) (static_cast<type_>(QXK_current()->m_thread)) |
Access Thread-Local Storage (TLS) and cast it on the given type_. More... | |
| #define | QXK_ISR_CONTEXT_() (QXK_attr_.intNest != 0U) |
| Internal port-specific macro that reports the execution context. More... | |
| #define | QF_SCHED_STAT_ QSchedStatus lockStat_; |
| Internal macro to represent the scheduler lock status. More... | |
| #define | QF_SCHED_LOCK_(prio_) |
| Internal macro for selective scheduler locking. More... | |
| #define | QF_SCHED_UNLOCK_() |
| Internal macro for selective scheduler unlocking. More... | |
| #define | QACTIVE_EQUEUE_WAIT_(me_) Q_ASSERT_ID(110, (me_)->m_eQueue.m_frontEvt != nullptr) |
| #define | QACTIVE_EQUEUE_SIGNAL_(me_) |
| #define | QF_EPOOL_TYPE_ QMPool |
| #define | QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_) (p_).init((poolSto_), (poolSize_), (evtSize_)) |
| #define | QF_EPOOL_EVENT_SIZE_(p_) ((p_).getBlockSize()) |
| #define | QF_EPOOL_GET_(p_, e_, m_, qs_id_) ((e_) = static_cast<QEvt *>((p_).get((m_), (qs_id_)))) |
| #define | QF_EPOOL_PUT_(p_, e_, qs_id_) ((p_).put((e_), (qs_id_))) |
Functions | |
| std::uint_fast8_t | QXK_sched_ (void) noexcept |
| QXK scheduler finds the highest-priority thread ready to run. More... | |
| void | QXK_activate_ (void) |
| QXK activator activates the next active object. The activated AO preempts. More... | |
| QP::QActive * | QXK_current (void) noexcept |
| return the currently executing active-object/thread More... | |
| void | QXK_onContextSw (QP::QActive *prev, QP::QActive *next) |
| QXK context switch callback (customized in BSPs for QXK) More... | |
Variables | |
| QXK_Attr | QXK_attr_ |
| global attributes of the QXK kernel More... | |
QXK/C++ preemptive extended (blocking) kernel, platform-independent public interface.
Definition in file qxk.hpp.
| struct QXK_Attr |

| Data Fields | ||
|---|---|---|
| QActive *volatile | curr | currently executing thread |
| QActive *volatile | next | next thread to execute |
| uint8_t volatile | actPrio | prio of the active basic thread |
| uint8_t volatile | lockPrio | lock prio (0 == no-lock) |
| uint8_t volatile | lockHolder | prio of the lock holder |
| uint8_t volatile | intNest | ISR nesting level. |
| QActive * | idleThread | pointer to the idle thread |
| QPSet | readySet | ready-set of all threads |
| #define QXK_TLS | ( | type_ | ) | (static_cast<type_>(QXK_current()->m_thread)) |
| #define QXK_ISR_CONTEXT_ | ( | ) | (QXK_attr_.intNest != 0U) |
| #define QF_SCHED_STAT_ QSchedStatus lockStat_; |
| #define QF_SCHED_LOCK_ | ( | prio_ | ) |
Internal macro for selective scheduler locking.
| #define QF_SCHED_UNLOCK_ | ( | ) |
| #define QACTIVE_EQUEUE_WAIT_ | ( | me_ | ) | Q_ASSERT_ID(110, (me_)->m_eQueue.m_frontEvt != nullptr) |
| #define QACTIVE_EQUEUE_SIGNAL_ | ( | me_ | ) |
| #define QF_EPOOL_INIT_ | ( | p_, | |
| poolSto_, | |||
| poolSize_, | |||
| evtSize_ | |||
| ) | (p_).init((poolSto_), (poolSize_), (evtSize_)) |
| #define QF_EPOOL_GET_ | ( | p_, | |
| e_, | |||
| m_, | |||
| qs_id_ | |||
| ) | ((e_) = static_cast<QEvt *>((p_).get((m_), (qs_id_)))) |
| #define QF_EPOOL_PUT_ | ( | p_, | |
| e_, | |||
| qs_id_ | |||
| ) | ((p_).put((e_), (qs_id_))) |
|
noexcept |
QXK scheduler finds the highest-priority thread ready to run.
| void QXK_activate_ | ( | void | ) |
QXK activator activates the next active object. The activated AO preempts.
|
noexcept |
| void QXK_onContextSw | ( | QP::QActive * | prev, |
| QP::QActive * | next | ||
| ) |
QXK context switch callback (customized in BSPs for QXK)
| [in] | prev | pointer to the previous thread (active object) (prev==0 means that prev was the QXK idle thread) |
| [in] | next | pointer to the next thread (active object) (next==0) means that next is the QXK idle thread) |