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
Go to the documentation of this file.
1
11
14#define RTE_PLATFORM_RT_PRIORITY_MAX 99U
15
17
21
23
25
26
29{
30 rte_status_t lifecycle_status;
31
32 if (osadapter == NULL)
33 {
35 }
36 /* REQ-LIFECYCLE-001 (ADR-026): registering an OSAdapter is a setup-only
37 * action - refuse once the application's setup phase has been locked. */
38 lifecycle_status = rte_lifecycle_check_setup_allowed();
39 if (lifecycle_status != RTE_STATUS_OK)
40 {
41 return lifecycle_status;
42 }
43 s_osadapter = osadapter;
44 return RTE_STATUS_OK;
45}
46
48{
49 if (rt_priority > RTE_PLATFORM_RT_PRIORITY_MAX)
50 {
52 }
53 if (s_osadapter == NULL)
54 {
56 }
57 if (s_osadapter->realtime_init == NULL)
58 {
60 }
61 return s_osadapter->realtime_init(rt_priority);
62}
rte_status_t rte_lifecycle_check_setup_allowed(void)
Convenience check for a setup-only constructor: call this as one of the first checks in any function ...
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....
rte_status_t
Common result/status codes.
Definition rte_status.h:27
@ RTE_STATUS_OK
Definition rte_status.h:28
@ RTE_STATUS_INVALID_PARAM
Definition rte_status.h:29
@ RTE_STATUS_NOT_SUPPORTED
Definition rte_status.h:34
@ RTE_STATUS_NOT_INITIALIZED
Definition rte_status.h:30
static const rte_osadapter_clocksync_t * s_osadapter
Process-wide application setup-phase lock (ADR-026).
OSAdapter interface for real-time platform configuration.
rte_status_t rte_osadapter_platform_register(const rte_osadapter_platform_t *adapter)
Registers the OSAdapter platform implementation.
#define RTE_PLATFORM_RT_PRIORITY_MAX
Highest real-time priority rte_platform_realtime_init() accepts.
OS Abstraction Layer - Real-time platform configuration service (ADR-035).
OSAdapter platform operations vtable.