Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

thread.h File Reference

#include "copyright.h"
#include "utility.h"
#include "sysdep.h"

Go to the source code of this file.

Compounds

class  Thread
 The following class defines a "thread control block" -- which represents a single thread of execution. Every thread has: an execution stack for activation records ("stackTop" and "stack") space to save CPU registers while not running ("machineState") a "status" (running/ready/blocked) Some threads also belong to a user address space; threads that only run in the kernel have a NULL address space. More...


Defines

#define MachineStateSize   75

Enumerations

enum  ThreadStatus { JUST_CREATED, RUNNING, READY, BLOCKED }
 Thread state. More...


Functions

void ThreadPrint (Thread *thread)
 external function, dummy routine whose sole job is to call Thread::Print. More...

void ThreadRoot ()
 First frame on thread execution stack; call ThreadBegin call "func" (when func returns, if ever) call ThreadFinish(). More...

void SWITCH (Thread *oldThread, Thread *newThread)
 Stop running oldThread and start running newThread. More...


Variables

const int StackSize = (4 * 1024)
 Size of the thread's private execution stack. WATCH OUT IF THIS ISN'T BIG ENOUGH!!!!! More...


Define Documentation

#define MachineStateSize   75
 

Definition at line 56 of file thread.h.


Enumeration Type Documentation

enum ThreadStatus
 

Thread state.

Enumeration values:
JUST_CREATED  
RUNNING  
READY  
BLOCKED  

Definition at line 65 of file thread.h.


Function Documentation

void SWITCH ( Thread * oldThread,
Thread * newThread )
 

Stop running oldThread and start running newThread.

void ThreadPrint ( Thread * thread )
 

external function, dummy routine whose sole job is to call Thread::Print.

Definition at line 273 of file thread.cc.

void ThreadRoot ( )
 

First frame on thread execution stack; call ThreadBegin call "func" (when func returns, if ever) call ThreadFinish().


Variable Documentation

const int StackSize = (4 * 1024)
 

Size of the thread's private execution stack. WATCH OUT IF THIS ISN'T BIG ENOUGH!!!!!

Definition at line 61 of file thread.h.


Generated at Wed Jul 4 11:32:22 2001 for Nachos by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001