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

Scheduler Class Reference

The Scheduler manages all active tasks and is responsible for switching between them to provide software multitasking. More...

#include <sched.h>

Collaboration diagram for Scheduler:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void init ()
void create_task (Task_func start_function)
void print ()

Public Attributes

List< Taskactive_tasks
Taskcurr_task
Task kernel_task
Task idle_task
Timer_callback context_switch_callback

Static Public Attributes

const unsigned TIMESLICE_SIZE = 10

Detailed Description

The Scheduler manages all active tasks and is responsible for switching between them to provide software multitasking.


Member Function Documentation

void Scheduler::create_task Task_func  start_function  ) 
 

Create a new task and add it to the list.

Do not call this until the virtual memory manager is fully initialized.

void Scheduler::init  ) 
 

Initialize the scheduler.

void Scheduler::print  ) 
 

Print basic information about this Scheduler.


Member Data Documentation

List<Task> Scheduler::active_tasks
 

the list of active tasks to manage

Timer_callback Scheduler::context_switch_callback
 

scheduled preemption callback

Task* Scheduler::curr_task
 

current executing task

Task Scheduler::idle_task
 

run when there are no active tasks

Task Scheduler::kernel_task
 

the very first task

const unsigned Scheduler::TIMESLICE_SIZE = 10 [static]
 

default timer ticks per timeslice


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

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