ICARUS OS (Intelligent Cooperative Architecture for Real-time Unified Systems) 0.1.0
Preemptive Real-Time Operating System for ARM Cortex-M7
Loading...
Searching...
No Matches
icarus_task_t Struct Reference

Task Control Block (TCB) More...

#include <types.h>

Data Fields

void(* function )(void)
 Task entry point function pointer.
 
uint32_t * stack_base
 Base address of task stack.
 
uint32_t stack_size
 Stack size in 32-bit words.
 
uint32_t * stack_pointer
 Current stack pointer (offset 12)
 
icarus_task_state_t task_state
 Current task state (offset 16)
 
uint32_t global_tick_paused
 Tick count when blocked (offset 20)
 
uint32_t ticks_to_pause
 Ticks to remain blocked (offset 24)
 
uint32_t * data_pointer
 Current data pointer (offset 28)
 
icarus_task_priority_t task_priority
 Task priority level.
 
char name [32]
 Human-readable task name.
 
uint32_t dispatch_count
 Times this task has been dispatched.
 
uint32_t stack_watermark
 Minimum free stack words observed.
 

Detailed Description

Task Control Block (TCB)

The TCB contains all information needed to manage a task's execution. Field ordering is critical for assembly code compatibility.

Warning
Do NOT reorder fields without updating context_switch.s offsets! Assembly code uses hardcoded offsets:
  • stack_pointer: offset 12
  • task_state: offset 16
  • global_tick_paused: offset 20
  • ticks_to_pause: offset 24
See also
Core/Src/kernel/context_switch.s for assembly offset usage

Definition at line 115 of file types.h.

Field Documentation

◆ data_pointer

uint32_t* icarus_task_t::data_pointer

Current data pointer (offset 28)

Definition at line 127 of file types.h.

Referenced by os_create_task().

◆ dispatch_count

uint32_t icarus_task_t::dispatch_count

Times this task has been dispatched.

Definition at line 132 of file types.h.

Referenced by __os_get_task_dispatch_count(), __os_restart_task(), and os_create_task().

◆ function

void(* icarus_task_t::function) (void)

Task entry point function pointer.

Definition at line 117 of file types.h.

Referenced by __os_restart_task(), and os_create_task().

◆ global_tick_paused

uint32_t icarus_task_t::global_tick_paused

Tick count when blocked (offset 20)

Definition at line 124 of file types.h.

Referenced by __os_restart_task(), __task_active_sleep(), and os_create_task().

◆ name

char icarus_task_t::name[32]

Human-readable task name.

Definition at line 131 of file types.h.

Referenced by __os_get_current_task_name(), __os_get_task_name(), and os_create_task().

◆ stack_base

uint32_t* icarus_task_t::stack_base

Base address of task stack.

Definition at line 118 of file types.h.

Referenced by __os_restart_task(), __os_update_stack_watermark(), and os_create_task().

◆ stack_pointer

uint32_t* icarus_task_t::stack_pointer

Current stack pointer (offset 12)

Definition at line 122 of file types.h.

Referenced by __os_restart_task(), and os_create_task().

◆ stack_size

uint32_t icarus_task_t::stack_size

Stack size in 32-bit words.

Definition at line 119 of file types.h.

Referenced by __os_restart_task(), __os_update_stack_watermark(), and os_create_task().

◆ stack_watermark

uint32_t icarus_task_t::stack_watermark

Minimum free stack words observed.

Definition at line 133 of file types.h.

Referenced by __os_get_stack_watermark(), __os_restart_task(), __os_update_stack_watermark(), and os_create_task().

◆ task_priority

icarus_task_priority_t icarus_task_t::task_priority

Task priority level.

Definition at line 130 of file types.h.

Referenced by os_create_task().

◆ task_state

icarus_task_state_t icarus_task_t::task_state

Current task state (offset 16)

Definition at line 123 of file types.h.

Referenced by __os_exit_task(), __os_get_task_state(), __os_kill_process(), __os_restart_task(), __task_active_sleep(), and os_create_task().

◆ ticks_to_pause

uint32_t icarus_task_t::ticks_to_pause

Ticks to remain blocked (offset 24)

Definition at line 125 of file types.h.

Referenced by __os_restart_task(), __task_active_sleep(), and os_create_task().


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