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

sched.cc File Reference

#include "sched.h"
#include "pic.h"
#include "irq.h"
#include "arch.h"
#include "critical.h"
#include "semaphore.h"
#include "virtmem.h"

Include dependency graph for sched.cc:

Include dependency graph

Functions

void context_switch ()
void sleep (unsigned milliseconds)
bool wakeup (void *task)
void die ()
void idle_function ()

Function Documentation

void context_switch  ) 
 

Perform an actual context switch from the current task to the next one.

This is called periodically by the Timer, and can also be called manually in order to yield the remainder of the current task's timeslice.

void die  ) 
 

Quit the current task and have a slice of quiche.

void idle_function  ) 
 

The function that is run by the idle task.

void sleep unsigned  milliseconds  ) 
 

Put the current task to sleep for the given number of milliseconds.

bool wakeup void *  task  ) 
 

Wake up the given task.


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