RTOS Wrapper
API reference
Loading...
Searching...
No Matches
OsAbstraction.h File Reference

Generic RTOS abstraction — public header. More...

#include "os/os_freertos.h"

Go to the source code of this file.

Detailed Description

Generic RTOS abstraction — public header.

Exposes one set of OS_* types and os_* functions regardless of the scheduler underneath, so component code never names a kernel. Select a backend by defining exactly one of:

Macro Backend Header
HF_RTOS_CMSIS CMSIS-RTOS2 (osThreadNew / osDelay) os/os_cmsis.h
HF_RTOS_FREERTOS FreeRTOS (vanilla or ESP-IDF SMP) os/os_freertos.h
HF_RTOS_THREADX Azure RTOS ThreadX os/os_threadx.h
*(none)* Bare-metal / host tests os/os_none.h

Porting contract

A backend owns every kernel difference — include layout, core affinity, critical-section style, tick source. Consumers must never need a force-included compatibility header or a synthesized include directory to make a backend compile. If a kernel variant does not fit, extend its backend header; do not patch it from a build system.

Capability macros a backend must define:

See also
os/README.md for the backend matrix and how to add one.