00300 /* 00301 * Random set of variables 00302 * used by more than one 00303 * routine. 00304 */ 00305 char canonb[CANBSIZ]; /* buffer for erase and kill (#@) */ 00306 struct inode *rootdir; /* pointer to inode of root directory */ 00307 struct proc *runq; /* head of linked list of running processes */ 00308 int cputype; /* type of cpu =40, 45, or 70 */ 00309 int lbolt; /* time of day in 60th not in time */ 00310 time_t time; /* time in sec from 1970 */ 00311 00312 /* 00313 * Nblkdev is the number of entries 00314 * (rows) in the block switch. It is 00315 * set in binit/bio.c by making 00316 * a pass over the switch. 00317 * Used in bounds checking on major 00318 * device numbers. 00319 */ 00320 int nblkdev; 00321 00322 /* 00323 * Number of character switch entries. 00324 * Set by cinit/tty.c 00325 */ 00326 int nchrdev; 00327 00328 int mpid; /* generic for unique process id's */ 00329 char runin; /* scheduling flag */ 00330 char runout; /* scheduling flag */ 00331 char runrun; /* scheduling flag */ 00332 char curpri; /* more scheduling */ 00333 int maxmem; /* actual max memory per process */ 00334 physadr lks; /* pointer to clock device */ 00335 daddr_t swplo; /* block number of swap space */ 00336 int nswap; /* size of swap space */ 00337 int updlock; /* lock for sync */ 00338 daddr_t rablock; /* block to be read ahead */ 00339 extern char regloc[]; /* locs. of saved user registers (trap.c) */ 00340 char msgbuf[MSGBUFS]; /* saved "printf" characters */ 00341 dev_t rootdev; /* device of the root */ 00342 dev_t swapdev; /* swapping device */ 00343 dev_t pipedev; /* pipe device */ 00344 extern int icode[]; /* user init code */ 00345 extern int szicode; /* its size */ 00346 00347 dev_t getmdev(); 00348 daddr_t bmap(); 00349 struct inode *ialloc(); 00350 struct inode *iget(); 00351 struct inode *owner(); 00352 struct inode *maknode(); 00353 struct inode *namei(); 00354 struct buf *alloc(); 00355 struct buf *getblk(); 00356 struct buf *geteblk(); 00357 struct buf *bread(); 00358 struct buf *breada(); 00359 struct filsys *getfs(); 00360 struct file *getf(); 00361 struct file *falloc(); 00362 int uchar(); 00363 /* 00364 * Instrumentation 00365 */ 00366 int dk_busy; 00367 long dk_time[32]; 00368 long dk_numb[3]; 00369 long dk_wds[3]; 00370 long tk_nin; 00371 long tk_nout; 00372 00373 /* 00374 * Structure of the system-entry table 00375 */ 00376 extern struct sysent { 00377 char sy_narg; /* total number of arguments */ 00378 char sy_nrarg; /* number of args in registers */ 00379 int (*sy_call)(); /* handler */ 00380 } sysent[]; 00381 00382 00383 00384 00385 00386 00387 00388 00389 00390 00391 00392 00393 00394 00395 00396 00397 00398 00399