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...
|