Main Page | Alphabetical List | Class List | File List | Class Members | File Members

system.h

Go to the documentation of this file.
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 #define NSECS_PER_SEC 1000000000 00020 #define PREEMPTION 1 00021 #define TICKS_PER_SEC 15 00022 extern long timerCount; 00023 extern long secCount; 00024 00025 // Initialization and cleanup routines 00026 extern void Initialize(int argc, char **argv); // Initialization, 00027 // called before anything else 00028 extern void Cleanup(); // Cleanup, called when 00029 // Nachos is done. 00030 00031 extern Thread *currentThread; // the thread holding the CPU 00032 extern Thread *threadToBeDestroyed; // the thread that just finished 00033 extern Scheduler *scheduler; // the ready list 00034 extern Interrupt *interrupt; // interrupt status 00035 extern Statistics *stats; // performance metrics 00036 extern Timer *timer; // the hardware alarm clock 00037 00038 #ifdef USER_PROGRAM 00039 #include "machine.h" 00040 extern Machine* machine; // user program memory and registers 00041 #endif 00042 00043 #ifdef FILESYS_NEEDED // FILESYS or FILESYS_STUB 00044 #include "filesys.h" 00045 extern FileSystem *fileSystem; 00046 #endif 00047 00048 #ifdef FILESYS 00049 #include "synchdisk.h" 00050 extern SynchDisk *synchDisk; 00051 #endif 00052 00053 #ifdef NETWORK 00054 #include "post.h" 00055 extern PostOffice* postOffice; 00056 #endif 00057 00058 #endif // SYSTEM_H

Generated on Thu Sep 16 12:33:45 2004 for NachOS by doxygen 1.3.8