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