00001
00002
00003
00004
00005
00006
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
00026
extern void Initialize(
int argc,
char **argv);
00027
00028
extern void Cleanup();
00029
00030
00031
extern Thread *
currentThread;
00032
extern Thread *
threadToBeDestroyed;
00033
extern Scheduler *
scheduler;
00034
extern Interrupt *
interrupt;
00035
extern Statistics *
stats;
00036
extern Timer *
timer;
00037
00038
#ifdef USER_PROGRAM
00039
#include "machine.h"
00040
extern Machine* machine;
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