QP/C  5.8.2

Preemptive Dual-Mode Blocking RTOS Kernel. More...


file  qpc.h
 QP/C public interface including backwards-compatibility layer.
file  qxk.h
 QXK/C (preemptive dual-mode kernel) platform-independent public interface.
file  qxthread.h
 QXK/C eXtended (blocking) thread.
file  qxk.c
 QXK preemptive dual-mode kernel core functions.
file  qxk_mutex.c
 QXMutex_init(), QXMutex_lock and QXMutex_unlock() definitions.
file  qxk_pkg.h
 Internal (package scope) QXK/C interface.
file  qxk_sema.c
 QXK preemptive kernel semaphore functions.
file  qxk_xthr.c
 QXK preemptive kernel extended (blocking) thread functions.
file  qf_port.h
 QF/C port example for QXK, generic C compiler.
file  qxk_port.h
 QXK/C port example for a generic C compiler.

Detailed Description

Preemptive Dual-Mode Blocking RTOS Kernel.

QXK is a small, preemptive, priority-based, dual-mode blocking kernel that executes active objects like the QK kernel, but can also execute traditional blocking threads (extended threads). In this respect, QXK behaves exactly as 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.

Classes of the QXK blocking kernel
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


Message Queues


Memory Pools