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