Safe API Framework 0.1.0 build 384e6ae
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Loading...
Searching...
No Matches
rte_platform.c File Reference

Real-time platform configuration service: validates parameters, then dispatches to the OSAdapter registered via rte_osadapter_platform_register() (ADR-005, ADR-035). More...

Include dependency graph for rte_platform.c:

Go to the source code of this file.

Macros

#define RTE_PLATFORM_RT_PRIORITY_MAX   99U
 Highest real-time priority rte_platform_realtime_init() accepts.

Functions

rte_status_t rte_osadapter_platform_register (const rte_osadapter_platform_t *osadapter)
 Registers the OSAdapter platform implementation.
rte_status_t rte_platform_realtime_init (uint32_t rt_priority)
 Applies the registered OSAdapter's real-time platform configuration for the calling process/thread. Call once at process startup, after the OSAdapter is registered and before any rte_timer_* / rte_task_* thread is created.

Variables

static const rte_osadapter_platform_t * s_osadapter = NULL
 Currently registered OSAdapter, or NULL if none (ADR-005).

Detailed Description

Real-time platform configuration service: validates parameters, then dispatches to the OSAdapter registered via rte_osadapter_platform_register() (ADR-005, ADR-035).

Definition in file rte_platform.c.

Macro Definition Documentation

◆ RTE_PLATFORM_RT_PRIORITY_MAX

#define RTE_PLATFORM_RT_PRIORITY_MAX   99U

Highest real-time priority rte_platform_realtime_init() accepts.

Local makros

Definition at line 14 of file rte_platform.c.

Function Documentation

◆ rte_osadapter_platform_register()

rte_status_t rte_osadapter_platform_register ( const rte_osadapter_platform_t * adapter)

Registers the OSAdapter platform implementation.

Global variables declarations Local function declarations Global functions

Parameters
adapterPointer to platform operations vtable.
Returns
RTE_STATUS_OK on success, RTE_STATUS_INVALID_PARAM if adapter is NULL, or RTE_STATUS_INVALID_STATE if the setup phase is already locked (REQ-LIFECYCLE-001, ADR-026; the previous registration, if any, is kept).

REQ-OAL-PLATFORM-011: Follows the OSAdapter-registration contract (ADR-005 section 2.1): a NULL adapter is rejected with RTE_STATUS_INVALID_PARAM; re-registering replaces the previous OSAdapter.

Definition at line 28 of file rte_platform.c.

Variable Documentation

◆ s_osadapter

const rte_osadapter_platform_t* s_osadapter = NULL
static

Currently registered OSAdapter, or NULL if none (ADR-005).

Local types declarations Local variables declarations

Definition at line 20 of file rte_platform.c.