1 /* systm.h 4.32 82/11/15 */ 2 3 /* 4 * Random set of variables 5 * used by more than one 6 * routine. 7 */ 8 int hz; /* frequency of the clock */ 9 int hand; /* current index into coremap used by daemon */ 10 extern char version[]; /* system version */ 11 12 /* 13 * Nblkdev is the number of entries 14 * (rows) in the block switch. It is 15 * set in binit/bio.c by making 16 * a pass over the switch. 17 * Used in bounds checking on major 18 * device numbers. 19 */ 20 int nblkdev; 21 22 /* 23 * Number of character switch entries. 24 * Set by cinit/prim.c 25 */ 26 int nchrdev; 27 28 int nswdev; /* number of swap devices */ 29 int mpid; /* generic for unique process id's */ 30 char runin; /* scheduling flag */ 31 char runout; /* scheduling flag */ 32 int runrun; /* scheduling flag */ 33 char kmapwnt; /* kernel map want flag */ 34 char curpri; /* more scheduling */ 35 36 int maxmem; /* actual max memory per process */ 37 int physmem; /* physical memory on this CPU */ 38 39 int nswap; /* size of swap space */ 40 int updlock; /* lock for sync */ 41 daddr_t rablock; /* block to be read ahead */ 42 int rasize; /* size of block in rablock */ 43 extern int intstack[]; /* stack for interrupts */ 44 dev_t rootdev; /* device of the root */ 45 dev_t dumpdev; /* device to take dumps on */ 46 long dumplo; /* offset into dumpdev */ 47 dev_t swapdev; /* swapping device */ 48 dev_t argdev; /* device for argument lists */ 49 50 #ifdef vax 51 extern int icode[]; /* user init code */ 52 extern int szicode; /* its size */ 53 #endif 54 #ifdef MUSH 55 extern int mcode[]; /* MUSH: startup code */ 56 extern int szmcode; /* & its size */ 57 #endif 58 59 dev_t getmdev(); 60 daddr_t bmap(); 61 caddr_t calloc(); 62 unsigned max(); 63 unsigned min(); 64 int memall(); 65 int uchar(), schar(); 66 int vmemall(); 67 caddr_t wmemall(); 68 swblk_t vtod(); 69 70 /* 71 * Structure of the system-entry table 72 */ 73 extern struct sysent 74 { 75 int sy_narg; /* total number of arguments */ 76 int (*sy_call)(); /* handler */ 77 } sysent[]; 78 79 int noproc; /* no one is running just now */ 80 char *panicstr; 81 int wantin; 82 int boothowto; /* reboot flags, from console subsystem */ 83 int selwait; 84 85 extern char vmmap[]; /* poor name! */ 86 87 /* casts to keep lint happy */ 88 #define insque(q,p) _insque((caddr_t)q,(caddr_t)p) 89 #define remque(q) _remque((caddr_t)q) 90 #define queue(q,p) _queue((caddr_t)q,(caddr_t)p) 91 #define dequeue(q) _dequeue((caddr_t)q) 92