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_task.c File Reference

Task service: validates parameters, then dispatches to the OSAdapter registered via rte_osadapter_task_register() (ADR-005). More...

Include dependency graph for rte_task.c:

Go to the source code of this file.

Functions

rte_status_t rte_osadapter_task_register (const rte_osadapter_task_t *osadapter)
 Registers the OSAdapter task implementation.
rte_status_t rte_task_create (rte_task_storage_t *storage, const rte_task_config_t *config, rte_task_handle_t *out_handle)
 Creates a task in the suspended state.
rte_status_t rte_task_start (rte_task_handle_t handle)
 Starts a created task.
rte_status_t rte_task_suspend (rte_task_handle_t handle)
 Suspends a running task.
rte_status_t rte_task_destroy (rte_task_handle_t handle)
 Terminates and destroys a task.

Variables

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

Detailed Description

Task service: validates parameters, then dispatches to the OSAdapter registered via rte_osadapter_task_register() (ADR-005).

Definition in file rte_task.c.

Function Documentation

◆ rte_osadapter_task_register()

rte_status_t rte_osadapter_task_register ( const rte_osadapter_task_t * adapter)

Registers the OSAdapter task implementation.

Global variables declarations Local function declarations Global functions

Parameters
adapterPointer to task 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-TASK-014: 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 25 of file rte_task.c.

Variable Documentation

◆ s_osadapter

const rte_osadapter_task_t* s_osadapter = NULL
static

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

Local makros Local types declarations Local variables declarations

Definition at line 17 of file rte_task.c.