Lazuli
Data Fields
Task Struct Reference

Represents a task. More...

#include <task.h>

Data Fields

const char * name
 The name of the task. More...
 
void(* entryPoint )(void)
 Entry point of execution of the task. More...
 
void * stackOrigin
 The bottom of the allocated stack for the task. More...
 
size_t stackSize
 The stack size of the task. More...
 
void * stackPointer
 The saved stack pointer of the task.
 
enum Lz_SchedulingPolicy schedulingPolicy
 The scheduling policy.
 
Lz_LinkedListElement stateQueue
 The scheduling queue on which the task is stored.
 
lz_u_resolution_unit_t period
 The period (T) of the task, expressed as an integer number of time units. More...
 
lz_u_resolution_unit_t completion
 The completion time (C) of the task (worst case execution time), expressed as an integer number of time units. More...
 
lz_u_resolution_unit_t timeUntilCompletion
 The number of time units until the task will complete its execution. More...
 
lz_u_resolution_unit_t timeUntilActivation
 The number of time units until the task will be activated. More...
 
lz_task_priority_t priority
 The task priority. More...
 
lz_u_resolution_unit_t timeUntilTimerExpiration
 The number of time units until the software timer expires for the task.
 
volatile lz_task_to_scheduler_message_t taskToSchedulerMessage
 The message the task has to pass to the scheduler for the next scheduling operation (i.e. More...
 
void * taskToSchedulerMessageParameter
 A parameter that can accompany a taskToSchedulerMessage. More...
 

Detailed Description

Represents a task.

Definition at line 76 of file task.h.

Field Documentation

◆ name

const char* Task::name

The name of the task.

Never changes once the Task is allocated.

Definition at line 82 of file task.h.

◆ entryPoint

void(* Task::entryPoint) (void)

Entry point of execution of the task.

Never changes once the Task is allocated.

Definition at line 89 of file task.h.

◆ stackOrigin

void* Task::stackOrigin

The bottom of the allocated stack for the task.

Never changes once the Task is allocated.

Warning
This member always points to the bottom of the task's stack (the first byte of the stack). So if the stack grows downwards (as on many architectures) this will always point to an address higher or equal to member stackPointer.

Definition at line 102 of file task.h.

◆ stackSize

size_t Task::stackSize

The stack size of the task.

Never changes once the Task is allocated.

Definition at line 109 of file task.h.

◆ period

lz_u_resolution_unit_t Task::period

The period (T) of the task, expressed as an integer number of time units.

Defined by task configuration when registering task, then left read-only.

Definition at line 130 of file task.h.

◆ completion

lz_u_resolution_unit_t Task::completion

The completion time (C) of the task (worst case execution time), expressed as an integer number of time units.

Defined by task configuration when registering task, then left read-only.

Definition at line 137 of file task.h.

◆ timeUntilCompletion

lz_u_resolution_unit_t Task::timeUntilCompletion

The number of time units until the task will complete its execution.

Updated by scheduler.

Definition at line 143 of file task.h.

◆ timeUntilActivation

lz_u_resolution_unit_t Task::timeUntilActivation

The number of time units until the task will be activated.

Updated by scheduler.

Definition at line 149 of file task.h.

◆ priority

lz_task_priority_t Task::priority

The task priority.

Only used for non-cyclic tasks.

Definition at line 154 of file task.h.

◆ taskToSchedulerMessage

volatile lz_task_to_scheduler_message_t Task::taskToSchedulerMessage

The message the task has to pass to the scheduler for the next scheduling operation (i.e.

after its time slice expires).

Attention
Declared volatile because it can be updated both by the task itself or the kernel.
Warning
This field is declared with a data type that is read/write atomic. If the field taskToSchedulerMessageParameter is used to pass a message to the scheduler, then this field taskToSchedulerMessage must be written last to ensure the integrity of all the pieces of data that compose the message to the scheduler.

Definition at line 174 of file task.h.

◆ taskToSchedulerMessageParameter

void* Task::taskToSchedulerMessageParameter

A parameter that can accompany a taskToSchedulerMessage.

This parameter is a "universal pointer" to the actual parameter.

Definition at line 181 of file task.h.


The documentation for this struct was generated from the following file: