xref: /original-bsd/sys/sys/systm.h (revision dc4562f1)
1 /*-
2  * Copyright (c) 1982, 1988, 1991 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)systm.h	7.25 (Berkeley) 07/19/92
8  */
9 
10 extern const char *panicstr;	/* panic message */
11 extern char version[];		/* system version */
12 extern char copyright[];	/* system copyright */
13 
14 extern int nblkdev;		/* number of entries in bdevsw */
15 extern int nchrdev;		/* number of entries in cdevsw */
16 extern int nswdev;		/* number of swap devices */
17 extern int nswap;		/* size of swap space */
18 
19 extern int selwait;		/* select timeout address */
20 
21 extern u_char curpri;		/* priority of current process */
22 
23 extern int maxmem;		/* max memory per process */
24 extern int physmem;		/* physical memory */
25 
26 extern dev_t dumpdev;		/* dump device */
27 extern long dumplo;		/* offset into dumpdev */
28 
29 extern dev_t rootdev;		/* root device */
30 extern struct vnode *rootvp;	/* vnode equivalent to above */
31 
32 extern dev_t swapdev;		/* swapping device */
33 extern struct vnode *swapdev_vp;/* vnode equivalent to above */
34 
35 extern struct sysent {		/* system call table */
36 	int	sy_narg;	/* number of arguments */
37 	int	(*sy_call)();	/* implementing function */
38 } sysent[];
39 
40 extern int boothowto;		/* reboot flags, from console subsystem */
41 
42 /* casts to keep lint happy */
43 #define	insque(q,p)	_insque((caddr_t)q,(caddr_t)p)
44 #define	remque(q)	_remque((caddr_t)q)
45 
46 /*
47  * General function declarations.
48  */
49 int	nullop __P((void));
50 int	enodev __P((void));
51 int	enoioctl __P((void));
52 int	enxio __P((void));
53 int	eopnotsupp __P((void));
54 int	seltrue __P((dev_t dev, int which, struct proc *p));
55 void	*hashinit __P((int count, int type, u_long *hashmask));
56 
57 #ifdef __GNUC__
58 volatile void	panic __P((const char *, ...));
59 #else
60 void	panic __P((const char *, ...));
61 #endif
62 void	tablefull __P((const char *));
63 void	addlog __P((const char *, ...));
64 void	log __P((int, const char *, ...));
65 void	printf __P((const char *, ...));
66 int	sprintf __P((char *buf, const char *, ...));
67 void	ttyprintf __P((struct tty *, const char *, ...));
68 
69 void	bcopy __P((void *from, void *to, u_int len));
70 void	ovbcopy __P((void *from, void *to, u_int len));
71 void	bzero __P((void *buf, u_int len));
72 
73 int	copystr __P((void *kfaddr, void *kdaddr, u_int len, u_int *done));
74 int	copyinstr __P((void *udaddr, void *kaddr, u_int len, u_int *done));
75 int	copyoutstr __P((void *kaddr, void *udaddr, u_int len, u_int *done));
76 int	copyin __P((void *udaddr, void *kaddr, u_int len));
77 int	copyout __P((void *kaddr, void *udaddr, u_int len));
78 
79 int	fubyte __P((void *base));
80 #ifdef notdef
81 int	fuibyte __P((void *base));
82 #endif
83 int	subyte __P((void *base, int byte));
84 int	suibyte __P((void *base, int byte));
85 int	fuword __P((void *base));
86 int	fuiword __P((void *base));
87 int	suword __P((void *base, int word));
88 int	suiword __P((void *base, int word));
89 
90 int	hzto __P((struct timeval *tv));
91 void	timeout __P((void (*func)(void *), void *arg, int ticks));
92 void	untimeout __P((void (*func)(void *), void *arg));
93 void	realitexpire __P((void *));
94 
95 struct clockframe;
96 void	hardclock __P((struct clockframe *frame));
97 void	softclock __P((void));
98 void	statclock __P((struct clockframe *frame));
99 
100 void	initclocks __P((void));
101 
102 void	startprofclock __P((struct proc *));
103 void	stopprofclock __P((struct proc *));
104 void	setstatclockrate __P((int hzrate));
105 
106 #include <libkern/libkern.h>
107