Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

Task Class Reference

A Task instance includes the stack and state information for an individual task. More...

#include <task.h>

Inherits List_node.

Inheritance diagram for Task:

Inheritance graph
[legend]
Collaboration diagram for Task:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void init ()

Static Public Member Functions

Taskcreate ()

Public Attributes

Task_state curr_state
Task_state next_state
unsigned volatile stack
Semaphoresemaphore

Detailed Description

A Task instance includes the stack and state information for an individual task.

Because Torsion is a single address space operating system, there is no distinction such at that between processes and threads. A single execution context in Torsion is called a task. And because it's so lightweight, you can think of it as similar to a thread in a traditional multiple address space operating system.


Member Function Documentation

Task * Task::create  )  [static]
 

Create a task object and return it.

void Task::init  ) 
 

Initialize this task by creating a stack for it.


Member Data Documentation

Task_state Task::curr_state
 

current state of this task

Task_state Task::next_state
 

next state that this task will be

Semaphore* Task::semaphore
 

semaphore waiting on (if any)

unsigned volatile Task::stack
 

saved task stack pointer


The documentation for this class was generated from the following files:

Torsion Operating System, Copyright (C) 2000-2004 Dan Helfman