Main Page   Modules   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

/projects/cubeos/src_current/kernel/schedule.h File Reference

#include <context.h>
#include <reent.h>
#include <list.h>

Include dependency graph for schedule.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Compounds

struct  process
 process/thread table entry. More...


Defines

#define RR_SCHEDULER
#define MAX_PROCESSNUM   16
 size of the process table. Incrementing makes things (slightly) slower. More...

#define MAX_PRIONUM   16
 size of the priority table. More...

#define NO_TASK   -1
 marker for empty task. More...

#define STATE_EMPTY   0
 thread slot not used. More...

#define STATE_RUNNING   1
 thread is on CPU. More...

#define STATE_READY   2
 thread ready to roll. More...

#define STATE_SUSPEND   3
 thread sleeping. More...

#define STATE_KILLED   4
 thread in coma (almost dead). More...


Functions

int KERN_schedinit ()
 initalizes the scheduler. More...

int KERN_delta_handler ()
 this is the kernel delta list handler. It is called by the periodic timer interrupe. More...

int KERN_create (void *function)
 starts a new thread. More...

void KERN_schedule (void)
 this is the scheduler. It is either called by the periodic timer interrupt or from a user thread. More...

int getpid ()
 returns the current process ID. More...

int KERN_suspend (int i)
 suspend a thread. More...

int wakeup (int i)

Variables

process _KERN_ptable [MAX_PROCESSNUM]
 The process table. More...

list _KERN_delta
 kernel delta queue. More...

list _KERN_prio [MAX_PRIONUM+1]


Detailed Description

Definition in file schedule.h.


Define Documentation

#define MAX_PRIONUM   16
 

size of the priority table.

Definition at line 29 of file schedule.h.

Referenced by KERN_create_prio, KERN_schedinit, and KERN_schedule.

#define MAX_PROCESSNUM   16
 

size of the process table. Incrementing makes things (slightly) slower.

Definition at line 28 of file schedule.h.

Referenced by kill.

#define NO_TASK   -1
 

marker for empty task.

Definition at line 30 of file schedule.h.

Referenced by KERN_create_prio, sem_destroy, sem_init, sem_post, and sem_wait.

#define RR_SCHEDULER
 

Definition at line 23 of file schedule.h.

#define STATE_EMPTY   0
 

thread slot not used.

Definition at line 32 of file schedule.h.

Referenced by KERN_create_prio, KERN_schedinit, KERN_schedule, KERN_suspend, and kill.

#define STATE_KILLED   4
 

thread in coma (almost dead).

Definition at line 36 of file schedule.h.

#define STATE_READY   2
 

thread ready to roll.

Definition at line 34 of file schedule.h.

Referenced by KERN_create_prio, KERN_schedule, and KERN_wakeup.

#define STATE_RUNNING   1
 

thread is on CPU.

Definition at line 33 of file schedule.h.

Referenced by KERN_schedinit, and KERN_schedule.

#define STATE_SUSPEND   3
 

thread sleeping.

Definition at line 35 of file schedule.h.

Referenced by KERN_schedule, KERN_suspend, and KERN_wakeup.


Function Documentation

int wakeup int    i
 

Referenced by sem_destroy, and sem_post.


Variable Documentation

list _KERN_delta
 

kernel delta queue.

Definition at line 63 of file schedule.h.

list _KERN_prio[MAX_PRIONUM+1]
 

Definition at line 64 of file schedule.h.

struct process _KERN_ptable[MAX_PROCESSNUM]
 

The process table.

Definition at line 61 of file schedule.h.


Generated on Thu Feb 20 15:38:54 2003 for cubeOS by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002