|
QP/C++
|
QK/C++ platform-independent public interface. More...
Go to the source code of this file.
Classes | |
| class | QK |
| QK services. More... | |
Defines | |
| #define | QF_EQUEUE_TYPE QEQueue |
| This macro defines the type of the event queue used for the active objects. | |
| #define | QACTIVE_EQUEUE_WAIT_(me_) Q_ASSERT((me_)->m_eQueue.m_frontEvt != static_cast<QEvt const *>(0)) |
| Platform-dependent macro defining how QF should block the calling task when the QF native queue is empty. | |
| #define | QACTIVE_EQUEUE_SIGNAL_(me_) |
| Platform-dependent macro defining how QF should signal the active object task that an event has just arrived. | |
| #define | QACTIVE_EQUEUE_ONEMPTY_(me_) QK_readySet_.remove((me_)->m_prio) |
| Platform-dependent macro defining the action QF should take when the native QF event queue becomes empty. | |
| #define | QF_EPOOL_TYPE_ QMPool |
| This macro defines the type of the event pool used in this QF port. | |
| #define | QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_) |
| Platform-dependent macro defining the event pool initialization. | |
| #define | QF_EPOOL_EVENT_SIZE_(p_) static_cast<uint32_t>((p_).getBlockSize()) |
| Platform-dependent macro defining how QF should obtain the event pool block-size. | |
| #define | QF_EPOOL_GET_(p_, e_) ((e_) = static_cast<QEvt *>((p_).get())) |
| Platform-dependent macro defining how QF should obtain an event e_ from the event pool p_. | |
| #define | QF_EPOOL_PUT_(p_, e_) ((p_).put(e_)) |
| Platform-dependent macro defining how QF should return an event e_ to the event pool p_. | |
Functions | |
| QP_END_ void | QK_init (void) |
| QK initialization. | |
| void | QK_sched_ (uint8_t p) |
| The QK scheduler. | |
| void | QK_schedExt_ (uint8_t p) |
| The QK extended scheduler for interrupt context. | |
| uint8_t | QK_schedPrio_ (void) |
| Find the highest-priority task ready to run. | |
Variables | |
| QP_BEGIN_ typedef uint8_t | QMutex |
| QK Mutex type. | |
| QP_ QPSet64 | QK_readySet_ |
| ready set of QK | |
| uint8_t | QK_currPrio_ |
| current task/interrupt priority | |
| uint8_t | QK_intNest_ |
| interrupt nesting level | |
QK/C++ platform-independent public interface.
This header file must be included directly or indirectly in all modules (*.cpp files) that use QK/C++.
Definition in file qk.h.
| #define QACTIVE_EQUEUE_ONEMPTY_ | ( | me_ | ) | QK_readySet_.remove((me_)->m_prio) |
Platform-dependent macro defining the action QF should take when the native QF event queue becomes empty.
| #define QACTIVE_EQUEUE_SIGNAL_ | ( | me_ | ) |
do { \ QK_readySet_.insert((me_)->m_prio); \ if (QK_intNest_ == static_cast<uint8_t>(0)) { \ uint8_t p = QK_schedPrio_(); \ if (p != static_cast<uint8_t>(0)) { \ QK_sched_(p); \ } \ } \ } while (false)
Platform-dependent macro defining how QF should signal the active object task that an event has just arrived.
The macro is necessary only when the native QF event queue is used. The signaling of task involves unblocking the task if it is blocked.
Definition at line 120 of file qk.h.
Referenced by QActive::postFIFO(), and QActive::postLIFO().
| #define QACTIVE_EQUEUE_WAIT_ | ( | me_ | ) | Q_ASSERT((me_)->m_eQueue.m_frontEvt != static_cast<QEvt const *>(0)) |
Platform-dependent macro defining how QF should block the calling task when the QF native queue is empty.
| #define QF_EPOOL_EVENT_SIZE_ | ( | p_ | ) | static_cast<uint32_t>((p_).getBlockSize()) |
Platform-dependent macro defining how QF should obtain the event pool block-size.
Definition at line 166 of file qk.h.
Referenced by QF::new_(), and QF::poolInit().
| #define QF_EPOOL_GET_ | ( | p_, | |
| e_ | |||
| ) | ((e_) = static_cast<QEvt *>((p_).get())) |
Platform-dependent macro defining how QF should obtain an event e_ from the event pool p_.
Definition at line 175 of file qk.h.
Referenced by QF::new_().
| #define QF_EPOOL_INIT_ | ( | p_, | |
| poolSto_, | |||
| poolSize_, | |||
| evtSize_ | |||
| ) |
(p_).init((poolSto_), (poolSize_), \
static_cast<QMPoolSize>(evtSize_))
Platform-dependent macro defining the event pool initialization.
Definition at line 156 of file qk.h.
Referenced by QF::poolInit().
| #define QF_EPOOL_PUT_ | ( | p_, | |
| e_ | |||
| ) | ((p_).put(e_)) |
Platform-dependent macro defining how QF should return an event e_ to the event pool p_.
Definition at line 183 of file qk.h.
Referenced by QF::gc().
| #define QF_EPOOL_TYPE_ QMPool |
| #define QF_EQUEUE_TYPE QEQueue |
This macro defines the type of the event queue used for the active objects.
| void QK_sched_ | ( | uint8_t | p | ) |
The QK scheduler.
Definition at line 72 of file qk_sched.cpp.
References QF::active_, QS::aoObj_, QPSet64::findMax(), QF::gc(), QF_INT_DISABLE, QF_INT_ENABLE, QK_currPrio_, QK_readySet_, QK_TLS, QP_, QS_BEGIN_NOCRIT_, QS_END_NOCRIT_, QS_QK_SCHEDULE, QS_TIME_, and QS_U8_.
Referenced by QK::mutexUnlock().
| void QK_schedExt_ | ( | uint8_t | p | ) |
The QK extended scheduler for interrupt context.
Definition at line 54 of file qk_ext.cpp.
References QF::active_, QS::aoObj_, QPSet64::findMax(), QF::gc(), QF_INT_DISABLE, QF_INT_ENABLE, QK_currPrio_, QK_EXT_SAVE, QK_readySet_, QK_TLS, QP_, QS_BEGIN_NOCRIT_, QS_END_NOCRIT_, QS_QK_SCHEDULE, QS_TIME_, and QS_U8_.
| uint8_t QK_schedPrio_ | ( | void | ) |
Find the highest-priority task ready to run.
Definition at line 56 of file qk_sched.cpp.
References QPSet64::findMax(), QK_ceilingPrio_, QK_currPrio_, and QK_readySet_.
Referenced by QK::mutexUnlock().
QK Mutex type.
QMutex represents the priority-ceiling mutex available in QK.
1.7.6.1