armOS  0.1.0
Minimal ARM Operating System for the Raspberry Pi - Documentation generated for Pi 4.
task_struct Struct Reference

#include <scheduler.h>

Collaboration diagram for task_struct:

Data Fields

cpu_context cpu_context
 
int64_t state
 
int64_t counter
 
int64_t priority
 
int64_t preempt_count
 

Detailed Description

Structure that describes a process.

This struct has the following members:

  • task_struct.cpu_context: A struct for the registers to be saved for the process.
  • task_struct.state: The state of the currently running task.
  • task_struct.counter: Used to determine how long the current task has been running. Decreases by 1 each timer tick. When it reaches 0 another task is scheduled.
  • task_struct.priority: When a new task is scheduled its priority is copied to counter. We regulate the amount of cpu time the task gets relative to other tasks.
  • task_struct.preempt_count: Non-zero value indicates critical task, that must not be interrupted.

Field Documentation

◆ counter

int64_t task_struct::counter

Used to determine how long the current task has been running.

◆ cpu_context

cpu_context task_struct::cpu_context

A struct for the registers to be saved for the process.

◆ preempt_count

int64_t task_struct::preempt_count

Non-zero value indicates critical task, that must not be interrupted.

◆ priority

int64_t task_struct::priority

When a new task is scheduled its priority is copied to counter.

◆ state

int64_t task_struct::state

The state of the currently running task.


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