QP/C++  5.8.2
QXK

Preemptive Blocking RTOS Kernel. More...

Files

file  qpcpp.h
 QP/C++ public interface including backwards-compatibility layer.
 
file  qxk.h
 QXK/C++ preemptive extended (blocking) kernel, platform-independent public interface.
 
file  qxthread.h
 QXK/C++ extended (blocking) thread.
 
file  qxk.cpp
 QXK/C++ preemptive kernel core functions public interface.
 
file  qxk_mutex.cpp
 QP::QXMutex::init(), QP::QXMutex::lock(), and QP::QXMutex::unlock() definitions.
 
file  qxk_pkg.h
 Internal (package scope) QXK/C++ interface.
 
file  qxk_sema.cpp
 QXK/C++ preemptive kernel counting semaphore implementation.
 
file  qxk_xthr.cpp
 QXK/C++ preemptive kernel extended (blocking) thread implementation.
 
file  qf_port.h
 QF/C++ port example, QXK kernel, Generic C++ compiler.
 
file  qxk_port.h
 QXK/C++ port example, Generic C++ compiler.
 

Namespaces

 QP
 namespace associated with the QP/C++ framework
 

Detailed Description

Preemptive Blocking RTOS Kernel.

QXK is a small, preemptive, priority-based, blocking kernel that provides typical services of a conventional RTOS (Real-Time Operating System). QXK has been designed specifically for mixing event-driven active objects with traditional blocking code, such as commercial middleware (TCP/IP stacks, UDP stacks, embedded file systems, etc.) or legacy software.

Currently, the QXK kernel has been ported to the following CPUs:

Currently, the QXK kernel is illustrated by the following examples:


QXK Overview

QXK distinguishes two kinds of threads: basic-threads (non-blocking, run-to-completion activations) and extended-threads (blocking, typically structrued as endless loops). The basic-threads all nest on the same stack (Main Stack Pointer in ARM Cortex-M). The extended-threads use private per-thread stacks, as in conventional RTOS kernels. Any switching from basic- to extended-thread or extended- to extended-thread requires full context switch. On the other hand, switching from basic-thread to another basic-thread requires only activation of the basic-thread, which is much simpler and faster.

Classes in QXK

The figure below shows the main classes introduced in the QXK kernel and their relation to the classes of the QP framework.

qxk_classes.gif
Classes of the QXK blocking kernel
Note
The main takeaway from the QXK class diagram is QXK's optimal, tight integration with the QP/C framework. The QXK kernel reuses all mechanisms already provided in QP, thus avoiding any code duplication, inefficient layers of indirection, and additional licensing costs, which are inevitable when using 3rd-party RTOS kernels to run QP/C applications.

QXK Features

As you can see in the list below, QXK provides most features you might expect of a traditional blocking RTOS kernel and is recommended as the preferred RTOS kernel for QP/C applications that need to mix active objects with traditional blocking code.

Kernel Initialization and Control

Thread Management

Interrupt Management

Mutexes

Message Queues

Semaphores

Memory Pools