Main Page   Compound List   File List   Compound Members   File Members  

threadtest.cc File Reference

#include "copyright.h"
#include "system.h"

Go to the source code of this file.

Functions

void SimpleThread (int which)
void ThreadTest ()


Function Documentation

void SimpleThread int    which
 

Definition at line 25 of file threadtest.cc.

Referenced by ThreadTest.

00026 {
00027     int num;
00028     
00029     for (num = 0; num < 5; num++) {
00030         printf("*** thread %d looped %d times\n", which, num);
00031         currentThread->Yield();
00032     }
00033 }

void ThreadTest void   
 

Definition at line 42 of file threadtest.cc.

References DEBUG, Thread::Fork, and SimpleThread.

00043 {
00044     DEBUG('t', "Entering SimpleTest");
00045 
00046     Thread *t = new Thread("forked thread");
00047 
00048     t->Fork(SimpleThread, 1);
00049     SimpleThread(0);
00050 }


Generated on Mon Feb 10 09:54:52 2003 for nachos by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002
The University of Southern California does not screen or control the content on this website and thus does not guarantee the accuracy, integrity, or quality of such content. All content on this website is provided by and is the sole responsibility of the person from which such content originated, and such content does not necessarily reflect the opinions of the University administration or the Board of Trustees