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.h
Go to the documentation of this file.
1
18#ifndef RTE_OS_TASK_H
19#define RTE_OS_TASK_H
20
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
29RTE_DECLARE_STORAGE(rte_task_storage_t, 128U);
30
32typedef struct rte_task_impl_s *rte_task_handle_t;
33
35typedef void (*rte_task_entry_t)(void *user_ctx);
36
38typedef struct rte_task_config_s
39{
40 const char *name;
42 void *user_ctx;
44 uint32_t priority;
45 size_t stack_size;
47
59rte_status_t rte_task_create(rte_task_storage_t *storage,
60 const rte_task_config_t *config,
61 rte_task_handle_t *out_handle);
62
71
79
87
88/*
89 * The OSAdapter vtable (rte_osadapter_task_t) and rte_osadapter_task_register()
90 * live in rte_osadapter/task/rte_osadapter_task.h, not here (ADR-021).
91 * This header is the consumer-facing surface only.
92 */
93
94#ifdef __cplusplus
95}
96#endif
97
98#endif /* RTE_OS_TASK_H */
99 /* TASK */
rte_status_t
Common result/status codes.
Definition rte_status.h:27
void(*) rte_task_entry_t(void *user_ctx)
Task entry point, invoked cyclically at the configured period.
Definition rte_task.h:35
rte_status_t rte_task_suspend(rte_task_handle_t handle)
Suspends a running task.
Definition rte_task.c:103
struct rte_task_impl_s * rte_task_handle_t
Opaque handle to a created task, returned by rte_task_create().
Definition rte_task.h:32
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.
Definition rte_task.c:44
rte_status_t rte_task_start(rte_task_handle_t handle)
Starts a created task.
Definition rte_task.c:77
rte_status_t rte_task_destroy(rte_task_handle_t handle)
Terminates and destroys a task.
Definition rte_task.c:120
#define RTE_DECLARE_STORAGE(type_name, byte_size)
Declares an opaque, fixed-size, aligned storage type for a service's handle. The real internal layout...
Definition rte_types.h:69
uint32_t rte_duration_ms_t
Definition rte_types.h:27
Common status/error codes returned by every Safe API Framework function. Shared across all OS Abstrac...
Common fixed-width types and the caller-owned-storage handle pattern used by every OAL service (see A...
Configuration for rte_task_create().
Definition rte_task.h:39
rte_duration_ms_t period_ms
Definition rte_task.h:43
size_t stack_size
Definition rte_task.h:45
uint32_t priority
Definition rte_task.h:44
rte_task_entry_t entry
Definition rte_task.h:41
const char * name
Definition rte_task.h:40