tac0S
Template Affectional Command Operating System
|
Routines to manage threads. More...
#include "copyright.h"
#include "thread.h"
#include "switch.h"
#include "synch.h"
#include "system.h"
Macros | |
#define | STACK_FENCEPOST 0xdeadbeef |
Functions | |
void | niquetamere () |
LB: This function has to be called on starting a new thread to set up the pagetable correctly. This was missing from the original version. Credits to Clement Menier for finding this bug! | |
void | SetupThreadState () |
void | ThreadPrint (int arg) |
End of addition. More... | |
char * | statusToString (ThreadStatus st) |
Routines to manage threads.
There are four main operations: Fork – create a thread to run a procedure concurrently with the caller (this is done in two steps – first allocate the Thread object, then call Fork on it) Finish – called when the forked procedure finishes, to clean up Yield – relinquish control over the CPU to another ready thread Sleep – relinquish control over the CPU, but thread is now blocked. In other words, it will not run again, until explicitly put back on the ready queue.
Copyright (c) 1992-1993 The Regents of the University of California. All rights reserved. See copyright.h for copyright notice and limitation of liability and disclaimer of warranty provisions.
void ThreadPrint | ( | int | arg | ) |
End of addition.
external function, dummy routine whose sole job is to call Thread::Print