tac0S
Template Affectional Command Operating System
|
Simple test case for the threads assignment. More...
Functions | |
void | SimpleThread (int which) |
SimpleThread Loop 5 times, yielding the CPU to another ready thread each iteration. More... | |
void | ThreadTest () |
ThreadTest Set up a ping-pong between two threads, by forking a thread to call SimpleThread, and then calling SimpleThread ourselves. | |
Simple test case for the threads assignment.
Create two threads, and have them context switch back and forth between themselves by calling Thread::Yield, to illustratethe inner workings of the thread system.
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 SimpleThread | ( | int | which | ) |
SimpleThread Loop 5 times, yielding the CPU to another ready thread each iteration.
[in] | which | is simply a number identifying the thread, for debugging purposes. |