QK/C++ platform-independent public interface. More...
Go to the source code of this file.
Data Structures | |
struct | QK_Attr |
attributes of the QK kernel (in C for easy access in assembly) More... | |
class | QK |
QK services. More... | |
Namespaces | |
QP | |
namespace associated with the QP/C++ framework | |
Macros | |
#define | QF_EQUEUE_TYPE QEQueue |
#define | QF_THREAD_TYPE void* |
#define | QK_ISR_CONTEXT_() (QK_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_))) |
Typedefs | |
using | QSchedStatus = std::uint_fast16_t |
The scheduler lock status. More... | |
Functions | |
std::uint_fast8_t | QK_sched_ (void) noexcept |
QK scheduler finds the highest-priority thread ready to run. More... | |
void | QK_activate_ (void) noexcept |
QK activator activates the next active object. The activated AO preempts. More... | |
void | QK_onContextSw (QP::QActive *prev, QP::QActive *next) |
QK context switch callback (customized in BSPs for QK) More... | |
Variables | |
QK_Attr | QK_attr_ |
global attributes of the QK kernel More... | |
QK/C++ platform-independent public interface.
Definition in file qk.hpp.
struct QK_Attr |
attributes of the QK kernel (in C for easy access in assembly)
Data Fields | ||
---|---|---|
uint8_t volatile | actPrio | prio of the active AO |
uint8_t volatile | nextPrio | prio of the next AO to execute |
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. |
QPSet | readySet | QK ready-set of AOs and "naked" threads. |
#define QK_ISR_CONTEXT_ | ( | ) | (QK_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 |
QK scheduler finds the highest-priority thread ready to run.
|
noexcept |
QK activator activates the next active object. The activated AO preempts.
void QK_onContextSw | ( | QP::QActive * | prev, |
QP::QActive * | next | ||
) |
QK context switch callback (customized in BSPs for QK)
[in] | prev | pointer to the previous thread (active object) (prev==0 means that prev was the QK idle loop) |
[in] | next | pointer to the next thread (active object) (next==0) means that next is the QK idle loop) |