Features Documentation Examples Repository Blog Contact

Kernel documentation

Covers parts of CMRX running in the privileged mode. Most of this code is accessible via system calls, while some being triggered by timing provider API or occupying vital system handlers. Kernel is divided into two parts: platform-independent part and part that is ported to support individual platforms.

Documentation of kernel internals is usable if you want to understand how certain features are implemented or if you are porting CMRX to another platform.

Functions

void _os_start(uint8_t start_core)

This function populates thread table based on thread autostart macro use. It also creates idle thread with priority 255 and starts scheduler. It never returns until you have very bad day.

start_core number of core for which the kernel is started

  • start_core number of core for which the kernel is started

Macros

os_start(core)


Context switching

Kernel internals in support context switching.

Interrupt service routines

Routines available from running interrupt service routine context.

Kernel core

Basic structures that contain the internal state of kernel.

Memory protection

Kernel internals in support for MPU configuration.

Notifications

Kernel internals supporting cross-process notifications.

Remote Procedure Calls

This kernel implementation of RPC mechanism.

Signal handling

Kernel implementation of signal propagation mechanism.

System calls

Portable parts of system call machinery.

Thread scheduling

Kernel primitives for manipulating threads.

Timers

Kernel internals providing services of delayed and periodic execution.

Tracing Kernel Events

Facilities to trace progress of kernel execution.

Transcation subsystem

CMRX kernel is mostly implemented as non-blocking.

64kB of protected memory ought to be enough for everyone.