#include "qequeue.h"
#include "qmpool.h"
#include "qpset.h"
#include "qs_port.h"
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 != (QEvent *)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_) (p_).init(poolSto_, poolSize_, evtSize_) |
| Platform-dependent macro defining the event pool initialization. | |
| #define | QF_EPOOL_EVENT_SIZE_(p_) ((p_).getBlockSize()) |
| Platform-dependent macro defining how QF should obtain the event pool block-size. | |
| #define | QF_EPOOL_GET_(p_, e_) ((e_) = (QEvent *)(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_. | |
Typedefs | |
| typedef uint8_t | QMutex |
| QK Mutex type. | |
Functions | |
| void | QK_init (void) |
| QK initialization. | |
Variables | |
| QPSet64 volatile | QK_readySet_ |
| ready set of QK | |
| uint8_t volatile | QK_currPrio_ |
| current task/interrupt priority | |
| uint8_t volatile | QK_intNest_ |
| interrupt nesting level | |
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.
This is just an example of QACTIVE_EQUEUE_ONEMPTY_ for the QK-port of QF. In other QF ports you need to define the macro appropriately for the underlying kernel/OS you're using.
Definition at line 129 of file qk.h.
Referenced by QActive::get_().
| #define QACTIVE_EQUEUE_SIGNAL_ | ( | me_ | ) |
Value:
QK_readySet_.insert((me_)->m_prio); \ if (QK_intNest_ == (uint8_t)0) { \ QK_SCHEDULE_(); \ } else ((void)0)
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.
This is just an example of QACTIVE_EQUEUE_SIGNAL_ for the QK-port of QF. In other QF ports you need to define the macro appropriately for the underlying kernel/OS you're using.
Definition at line 114 of file qk.h.
Referenced by QActive::postFIFO(), and QActive::postLIFO().
| #define QACTIVE_EQUEUE_WAIT_ | ( | me_ | ) | Q_ASSERT((me_)->m_eQueue.m_frontEvt != (QEvent *)0) |
Platform-dependent macro defining how QF should block the calling task when the QF native queue is empty.
Definition at line 98 of file qk.h.
Referenced by QActive::get_().
| #define QF_EPOOL_EVENT_SIZE_ | ( | p_ | ) | ((p_).getBlockSize()) |
Platform-dependent macro defining how QF should obtain the event pool block-size.
Definition at line 156 of file qk.h.
Referenced by QF::new_(), and QF::poolInit().
| #define QF_EPOOL_GET_ | ( | p_, | |||
| e_ | ) | ((e_) = (QEvent *)(p_).get()) |
Platform-dependent macro defining how QF should obtain an event e_ from the event pool p_.
Definition at line 164 of file qk.h.
Referenced by QF::new_().
| #define QF_EPOOL_INIT_ | ( | p_, | |||
| poolSto_, | |||||
| poolSize_, | |||||
| evtSize_ | ) | (p_).init(poolSto_, poolSize_, evtSize_) |
Platform-dependent macro defining the event pool initialization.
Definition at line 147 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 172 of file qk.h.
Referenced by QF::gc().
| #define QF_EPOOL_TYPE_ QMPool |
This macro defines the type of the event pool used in this QF port.
| #define QF_EQUEUE_TYPE QEQueue |
This macro defines the type of the event queue used for the active objects.
QK Mutex type.
QMutex represents the priority-ceiling mutex available in QK.
| void QK_init | ( | void | ) |
1.5.4