|
RTE OSAdapter POSIX 0.1.0 build 41b3eb3
POSIX/Linux OAL OSAdapter for Platform_RTE
|
POSIX rte_platform OSAdapter: real-time bring-up for a PREEMPT_RT Linux host (ADR-018, ADR-035). More...
#include "rte/posix_osadapter/rte_posix_osadapter.h"Go to the source code of this file.
Functions | |
| static rte_status_t | osadapter_realtime_init (uint32_t rt_priority) |
| const rte_osadapter_platform_t * | rte_posix_osadapter_platform (void) |
| The POSIX rte_platform OSAdapter (ADR-035): real-time bring-up via mlockall() + SCHED_FIFO, best-effort, on Linux; a no-op returning RTE_STATUS_OK on any other POSIX host. Register it (directly or via rte_posix_osadapter_register_all()) and call rte_platform_realtime_init() through the framework rather than reaching for an OSAdapter symbol - see safeAPIFreamwork's docs/architecture/ADR-035-platform-realtime-init.md. | |
Variables | |
| static const rte_osadapter_platform_t | s_posix_platform_osadapter = { osadapter_realtime_init } |
POSIX rte_platform OSAdapter: real-time bring-up for a PREEMPT_RT Linux host (ADR-018, ADR-035).
Locks the process image resident (mlockall) so cyclic execution is free of demand-paging jitter, pre-faults the current thread stack, and raises the calling thread to SCHED_FIFO at the requested priority. Every step is best-effort per REQ-OAL-PLATFORM-001: an unprivileged host, a kernel without an RT scheduler, or a bounded lockable-memory limit each degrade to a logged WARNING, never a hard failure, and the function still returns RTE_STATUS_OK.
RLIMIT_MEMLOCK interaction (the reason this is not just mlockall(MCL_CURRENT | MCL_FUTURE)): with a bounded RLIMIT_MEMLOCK, MCL_FUTURE forces every later mapping - including each new thread's stack - to be locked, so the next pthread_create() fails with EAGAIN and the process cannot start its timer/task threads at all (observed on a stock Ubuntu VM: 8 MiB memlock cap, 8 MiB default thread stack). When the limit is not RLIM_INFINITY this OSAdapter locks the current footprint only (MCL_CURRENT) and says so; a privileged / memlock=unlimited deployment still gets MCL_CURRENT | MCL_FUTURE.
On any non-Linux POSIX host the whole thing is a no-op that returns OK.
Definition in file rte_posix_osadapter_platform.c.
| #define _GNU_SOURCE |
Definition at line 6 of file rte_posix_osadapter_platform.c.
|
static |
Local makros Local types declarations Local function declarations
Definition at line 81 of file rte_posix_osadapter_platform.c.
| const rte_osadapter_platform_t * rte_posix_osadapter_platform | ( | void | ) |
The POSIX rte_platform OSAdapter (ADR-035): real-time bring-up via mlockall() + SCHED_FIFO, best-effort, on Linux; a no-op returning RTE_STATUS_OK on any other POSIX host. Register it (directly or via rte_posix_osadapter_register_all()) and call rte_platform_realtime_init() through the framework rather than reaching for an OSAdapter symbol - see safeAPIFreamwork's docs/architecture/ADR-035-platform-realtime-init.md.
Global variables declarations Global functions
Definition at line 73 of file rte_posix_osadapter_platform.c.
|
static |
Local variables declarations
Definition at line 67 of file rte_posix_osadapter_platform.c.