preemptive, dual-mode (non-blocking / blocking) kernel
More...
preemptive, dual-mode (non-blocking / blocking) kernel
- Description
- The QXK namespace contains only QXK facilities callable from C++. The following other QXK facilities are defined in the QP namespace as well as the global namespace to be callable from assembly (as
extern "C"):
◆ TimeoutSigs
| Enumerator |
|---|
| DELAY_SIG | |
| TIMEOUT_SIG | |
Definition at line 333 of file qxk.hpp.
◆ onIdle()
QXK idle callback (customized in BSPs for QXK)
- Description
- QXK::onIdle() is called continuously by the QXK idle thread. This callback gives the application an opportunity to enter a power-saving CPU mode, or perform some other idle processing.
- Note
- QXK::onIdle() is invoked with interrupts enabled and must also return with interrupts enabled.
◆ schedLock()
| QP::QXK::schedLock |
( |
std::uint_fast8_t const | ceiling | ) |
|
|
noexcept |
QXK Scheduler lock
- Description
- This function locks the QXK scheduler to the specified ceiling.
- Parameters
-
| [in] | ceiling | preemption ceiling to which the QXK scheduler needs to be locked |
- Returns
- The previous QXK Scheduler lock status, which is to be used to unlock the scheduler by restoring its previous lock status in QXK_schedUnlock().
- Precondition
qxk:100
- the QXK scheduler lock cannot be called from an ISR
- Note
- A QXK scheduler can be locked from both basic threads (AOs) and extended threads and the scheduler locks can nest.
-
QXK::schedLock() must be always followed by the corresponding QXK::schedUnlock().
- Attention
- QXK will fire an assertion if a thread holding the lock attempts to block.
- See also
- QXK::schedUnlock()
- Usage
- The following example shows how to lock and unlock the QXK scheduler:
std::uint32_t BSP::random() {
std::uint32_rnd = ...
. . .
return rnd;
}
QSchedStatus schedLock(std::uint_fast8_t const ceiling) noexcept
void schedUnlock(QSchedStatus const stat) noexcept
std::uint_fast8_t QSchedStatus
Definition at line 76 of file qxk.cpp.
◆ schedUnlock()
◆ current()