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