1 /* 2 * Copyright (c) 1982, 1986 Regents of the University of California. 3 * All rights reserved. The Berkeley software License Agreement 4 * specifies the terms and conditions for redistribution. 5 * 6 * @(#)systm.h 7.11 (Berkeley) 03/17/91 7 */ 8 9 /* 10 * Random set of variables 11 * used by more than one 12 * routine. 13 */ 14 extern char version[]; /* system version */ 15 16 /* 17 * Nblkdev is the number of entries (rows) in the block switch. 18 * Used in bounds checking on major device numbers. 19 */ 20 int nblkdev; 21 22 /* 23 * Number of character switch entries. 24 */ 25 int nchrdev; 26 27 int nswdev; /* number of swap devices */ 28 char kmapwnt; /* kernel map want flag */ 29 u_char curpri; /* priority of current process */ 30 31 int maxmem; /* actual max memory per process */ 32 int physmem; /* physical memory on this CPU */ 33 34 int nswap; /* size of swap space */ 35 extern int intstack[]; /* stack for interrupts */ 36 dev_t rootdev; /* device of the root */ 37 struct vnode *rootvp; /* vnode of root filesystem */ 38 dev_t dumpdev; /* device to take dumps on */ 39 long dumplo; /* offset into dumpdev */ 40 dev_t swapdev; /* swapping device */ 41 struct vnode *swapdev_vp; /* vnode equivalent to above */ 42 dev_t argdev; /* device for argument lists */ 43 struct vnode *argdev_vp; /* vnode equivalent to above */ 44 45 extern int icode[]; /* user init code */ 46 extern int szicode; /* its size */ 47 48 int memall(); 49 int vmemall(); 50 swblk_t vtod(); 51 52 /* 53 * Structure of the system-entry table 54 */ 55 extern struct sysent { 56 int sy_narg; /* total number of arguments */ 57 int (*sy_call)(); /* handler */ 58 } sysent[]; 59 60 int noproc; /* no one is running just now */ 61 char *panicstr; 62 int boothowto; /* reboot flags, from console subsystem */ 63 #ifdef KADB 64 char *bootesym; /* end of symbol info from boot */ 65 #endif 66 int selwait; 67 68 extern char *vmmap; /* poor name! */ 69 70 /* casts to keep lint happy */ 71 #define insque(q,p) _insque((caddr_t)q,(caddr_t)p) 72 #define remque(q) _remque((caddr_t)q) 73 74 /* 75 * General function declarations 76 */ 77 int nullop __P((void)); 78 int enodev __P((void)); 79 int enxio __P((void)); 80 int eopnotsupp __P((void)); 81 int seltrue __P((dev_t dev, int which, struct proc *p)); 82