Go to the documentation of this file.
19 #include <util/atomic.h>
31 ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
32 if (
TCB_Cfg[TaskID]->curNumberOfActivations + 1 >
TCB_Cfg[TaskID]->numberOfActivations) {
70 ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
91 #if defined(OS_CONFIG_HOOK_PRE_TASK) && OS_CONFIG_HOOK_PRE_TASK == true
125 ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
137 #if defined(OS_CONFIG_HOOK_PRE_TASK) && OS_CONFIG_HOOK_PRE_TASK == true
161 ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
192 ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
216 ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
239 #if defined (OS_CONFIG_STACK_MONITORING) && OS_CONFIG_STACK_MONITORING >= 2
242 #if OS_CONFIG_STACK_MONITORING >= 3
StatusType Task_Schedule(void)
Reschedule current task.
enum tasks_e TaskType
Type for task reference.
enum StatusType_e StatusType
Type for status.
uint8_t curNumberOfActivations
Current number of activations.
StatusType Task_ActivateTask(TaskType TaskID)
Activate a task.
@ EXTENDED
The task is a extended task.
Operating system control.
StatusType Task_GetTaskState(TaskType TaskID, TaskStateRefType State)
Return the state of a task.
Assert macros and functions.
volatile TaskType currentTask
Task currently being executed.
@ PREEMPTIVE
The task may be preempted by another task.
#define OS_SET_ERROR_INFO1(serviceId, paramPtr1, size1)
Set error info with up to one parameter.
uint8_t *const stack
Pointer to stack base.
StatusType Task_TerminateTask(void)
Terminate active task.
void OS_Schedule(void)
Schedule task.
volatile struct task_s * TCB_Cfg[]
Current task control blocks.
TaskStateType curState
Current state of the task.
void Task_startup(void)
Startup function for task management.
@ OSServiceId_ActivateTask
#define OS_SET_ERROR_INFO0(serviceId)
Set error info with zero parameters.
StatusType Task_ChainTask(TaskType TaskID)
Chain task.
TaskType * TaskRefType
Reference to a task reference.
EventMaskType pendingEvents
Mask of currently pending events.
@ AUTOSTART
Autostart task.
volatile bool isISR
Is currently ISR context?
@ READY
The task is ready to be scheduled.
#define assert(expression)
@ SUSPENDED
The task is suspended and will not be scheduled.
@ OSServiceId_GetTaskState
@ OSServiceId_TerminateTask
void PostTaskHook(void)
PostTask hook function.
#define TASK_COUNT
Count of tasks defined.
#define OS_SET_ERROR_INFO2(serviceId, paramPtr1, size1, paramPtr2, size2)
Set error info with up to two parameters.
TaskStateType * TaskStateRefType
Type for task state reference.
bool forceScheduling
Force the next rescheduling.
StatusType Task_GetTaskID(TaskRefType TaskID)
Return the ID of the task currently running.
void Resource_ReleaseInternalResource(void)
Release internal resource of the current task if one is assigned.
#define OS_CALL_ERROR_HOOK(error)
Call error hook if configured.
@ PRE_READY
The task is ready but its stack is uninitialized.