QK preemptive non-blocking kernel. More...
Static Public Member Functions | |
| static QSchedStatus | schedLock (std::uint8_t const ceiling) noexcept |
| QK selective scheduler lock. | |
| static void | schedUnlock (QSchedStatus const prevCeil) noexcept |
| QK selective scheduler unlock. | |
| static void | onIdle () |
| QK idle callback (customized in BSPs for QK). | |
| static std::uint_fast8_t | sched_ () noexcept |
| QK scheduler finds the highest-priority AO ready to run. | |
| static std::uint_fast8_t | sched_act_ (QActive const *const act, std::uint_fast8_t const pthre_in) noexcept |
| QK internal helper function to determine whether activation is needed. | |
| static void | activate_ () |
| QK activator activates the next active object. The activated AO preempts the currently executing AOs. | |
Public Attributes | |
| QP::QPSet | readySet |
| Set of active-objects/threads that are ready to run in the QK kernel . | |
| std::uint8_t | actPrio |
| Priority of the currently active AO . | |
| std::uint8_t | nextPrio |
| Next AO priority scheduled by QK . | |
| std::uint8_t | actThre |
| Preemption threshold of the currently active AO . | |
| std::uint8_t | lockCeil |
| Scheduler lock-ceiling (0 if scheduler unlocked) . | |
| std::uint8_t | intNest |
| Up-down counter indicating current interrupt nesting (used in some QK ports) . | |
Static Public Attributes | |
| static QK | priv_ |
|
staticnoexcept |
QK selective scheduler lock.
Details
This function locks the QK scheduler to the specified ceiling.
| [in] | ceiling | Preemption ceiling to which the QK scheduler needs to be locked |
| lock-status | The previous QK Scheduler lock status, which is to be used to unlock the scheduler by restoring its previous lock status in QK::schedUnlock(). |
See also
Usage
The following example shows how to lock and unlock the QK scheduler:
|
staticnoexcept |
QK selective scheduler unlock.
Details
This function unlocks the QK scheduler to the previous status.
| [in] | prevCeil | previous QK Scheduler lock ceiling returned from QK::schedLock() |
See also
Usage
The following example shows how to lock and unlock the QK scheduler:
|
static |
QK idle callback (customized in BSPs for QK).
Details
QK::onIdle() is called continuously by the QK idle loop. This callback gives the application an opportunity to enter a power-saving CPU mode, or perform some other idle processing.
|
staticnoexcept |
QK scheduler finds the highest-priority AO ready to run.
Details
The QK scheduler finds out the priority of the highest-priority AO that (1) has events to process and (2) has priority that is above the current priority.
| priority | The QF-priority of the next Active Object to activate |
| 0 | If no activation of AO is needed |
|
staticnoexcept |
QK internal helper function to determine whether activation is needed.
Details
| [in] | act | currently executing Active Object |
| [in] | pthre_in | current priority threshold |
| priority | Priority of Active Object to activate or 0 if no activation needed |
|
static |
QK activator activates the next active object. The activated AO preempts the currently executing AOs.
Details
QK::activate_() activates ready-to run AOs that are above the initial preemption-threshold.
| QP::QPSet QP::QK::readySet |
| std::uint8_t QP::QK::actPrio |
| std::uint8_t QP::QK::nextPrio |
| std::uint8_t QP::QK::actThre |
| std::uint8_t QP::QK::lockCeil |
| std::uint8_t QP::QK::intNest |