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
types.h File Reference

ICARUS OS Core Type Definitions. More...

#include <stdint.h>
#include <stdbool.h>
#include "icarus/config.h"

Go to the source code of this file.

Data Structures

struct  icarus_task_t
 Task Control Block (TCB) More...
 
struct  icarus_semaphore_t
 Counting Semaphore. More...
 
struct  icarus_pipe_t
 Message Pipe (Queue) More...
 

Enumerations

enum  icarus_task_state_t {
  TASK_STATE_COLD = 0 , TASK_STATE_RUNNING = 1 , TASK_STATE_READY = 2 , TASK_STATE_BLOCKED = 3 ,
  TASK_STATE_KILLED = 4 , TASK_STATE_FINISHED = 5
}
 Task state enumeration. More...
 
enum  icarus_task_priority_t { TASK_PRIORITY_LOW = 0 , TASK_PRIORITY_MED = 1 , TASK_PRIORITY_HIGH = 2 }
 Task priority levels. More...
 

Detailed Description

ICARUS OS Core Type Definitions.

Version
0.1.0

Defines all fundamental data types used throughout the ICARUS kernel. This includes task control blocks, synchronization primitives, and inter-process communication structures.

Note
All structures are designed for ARM Cortex-M7 alignment requirements.
See also
ARMv7-M Architecture Reference Manual for alignment requirements
docs/do178c/design/SDD.md Section 4.2 - Data Structures
Author
Souham Biswas
Date
2025

Definition in file types.h.

Enumeration Type Documentation

◆ icarus_task_priority_t

Task priority levels.

Note
Current implementation uses round-robin within priority levels. Future versions may implement strict priority scheduling.
Enumerator
TASK_PRIORITY_LOW 

Background/idle priority.

TASK_PRIORITY_MED 

Normal application priority.

TASK_PRIORITY_HIGH 

Time-critical priority.

Definition at line 90 of file types.h.

◆ icarus_task_state_t

Task state enumeration.

State transition diagram:

*                    ┌─────────┐
*                    │  COLD   │ (Initial state after creation)
*                    └────┬────┘
*                         │ task_start()
*                         ▼
*     ┌──────────────►┌─────────┐◄──────────────┐
*     │               │ RUNNING │               │
*     │               └────┬────┘               │
*     │                    │                    │
*     │ scheduler          │ os_yield() /       │ scheduler
*     │ preemption         │ time slice         │ dispatch
*     │                    ▼                    │
*     │               ┌─────────┐               │
*     └───────────────│  READY  │───────────────┘
*                     └────┬────┘
*                          │ task_active_sleep()
*                          ▼
*                     ┌─────────┐
*                     │ BLOCKED │ (Waiting for timeout/event)
*                     └────┬────┘
*                          │ timeout expired
*                          ▼
*                     ┌─────────┐
*                     │  READY  │
*                     └─────────┘
*
*     Any state ──► KILLED (os_kill_process)
*     Any state ──► FINISHED (os_exit_task)
* 
See also
docs/do178c/design/SDD.md Section 4.3 - Task State Machine
Enumerator
TASK_STATE_COLD 

Task created but never started.

TASK_STATE_RUNNING 

Task currently executing on CPU.

TASK_STATE_READY 

Task ready to run, waiting for CPU.

TASK_STATE_BLOCKED 

Task waiting for timeout or event.

TASK_STATE_KILLED 

Task terminated by another task.

TASK_STATE_FINISHED 

Task completed execution normally.

Definition at line 75 of file types.h.