00001 // system.h 00002 // All global variables used in Nachos are defined here. 00003 // 00004 // Copyright (c) 1992-1993 The Regents of the University of California. 00005 // All rights reserved. See copyright.h for copyright notice and limitation 00006 // of liability and disclaimer of warranty provisions. 00007 00008 #ifndef SYSTEM_H 00009 #define SYSTEM_H 00010 00011 #include "copyright.h" 00012 #include "utility.h" 00013 #include "thread.h" 00014 #include "scheduler.h" 00015 #include "interrupt.h" 00016 #include "stats.h" 00017 #include "timer.h" 00018 00019 // Initialization and cleanup routines 00020 extern void Initialize(int argc, char **argv); // Initialization, 00021 // called before anything else 00022 extern void Cleanup(); // Cleanup, called when 00023 // Nachos is done. 00024 00025 extern Thread *currentThread; // the thread holding the CPU 00026 extern Thread *threadToBeDestroyed; // the thread that just finished 00027 extern Scheduler *scheduler; // the ready list 00028 extern Interrupt *interrupt; // interrupt status 00029 extern Statistics *stats; // performance metrics 00030 extern Timer *timer; // the hardware alarm clock 00031 00032 #ifdef USER_PROGRAM 00033 #include "machine.h" 00034 extern Machine* machine; // user program memory and registers 00035 #endif 00036 00037 #ifdef FILESYS_NEEDED // FILESYS or FILESYS_STUB 00038 #include "filesys.h" 00039 extern FileSystem *fileSystem; 00040 #endif 00041 00042 #ifdef FILESYS 00043 #include "synchdisk.h" 00044 extern SynchDisk *synchDisk; 00045 #endif 00046 00047 #ifdef NETWORK 00048 #include "post.h" 00049 extern PostOffice* postOffice; 00050 #endif 00051 00052 #endif // SYSTEM_H
1.2.14 written by Dimitri van Heesch,
© 1997-2002