diff options
author | bde <bde@FreeBSD.org> | 1995-03-16 18:17:34 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-03-16 18:17:34 +0000 |
commit | 289f11acb49b6dbb3081e09bf94a86f008f55814 (patch) | |
tree | e4952f18ac85eccbbd3d9b0f010098732d07fe6d /sys/kern | |
parent | 4c4945abee9eabe3a2be340ba973ae861c21a3c6 (diff) | |
download | FreeBSD-src-289f11acb49b6dbb3081e09bf94a86f008f55814.zip FreeBSD-src-289f11acb49b6dbb3081e09bf94a86f008f55814.tar.gz |
Add and move declarations to fix all of the warnings from `gcc -Wimplicit'
(except in netccitt, netiso and netns) and most of the warnings from
`gcc -Wnested-externs'. Fix all the bugs found. There were no serious
ones.
Diffstat (limited to 'sys/kern')
31 files changed, 57 insertions, 108 deletions
diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c index bdce10d..003e9b2 100644 --- a/sys/kern/imgact_aout.c +++ b/sys/kern/imgact_aout.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: imgact_aout.c,v 1.10 1995/02/14 19:22:27 sos Exp $ + * $Id: imgact_aout.c,v 1.11 1995/02/20 22:23:03 davidg Exp $ */ #include <sys/param.h> @@ -52,7 +52,6 @@ exec_aout_imgact(iparams) unsigned long vmaddr, virtual_offset, file_offset; unsigned long bss_size; int error; - extern struct sysentvec aout_sysvec; #ifdef COMPAT_LINUX /* diff --git a/sys/kern/imgact_gzip.c b/sys/kern/imgact_gzip.c index 3178d10..a7e5f3c 100644 --- a/sys/kern/imgact_gzip.c +++ b/sys/kern/imgact_gzip.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: imgact_gzip.c,v 1.11 1995/02/13 07:40:33 phk Exp $ + * $Id: imgact_gzip.c,v 1.12 1995/02/20 22:23:07 davidg Exp $ * * This module handles execution of a.out files which have been run through * "gzip". This saves diskspace, but wastes cpu-cycles and VM. @@ -52,8 +52,6 @@ static int NextByte __P((void *vp)); static int do_aout_hdr __P((struct imgact_gzip *)); static int Flush __P((void *vp, u_char *, u_long siz)); -extern struct sysentvec aout_sysvec; - int exec_gzip_imgact(iparams) struct image_params *iparams; diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index b882e88..b0efc5a 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)init_main.c 8.9 (Berkeley) 1/21/94 - * $Id: init_main.c,v 1.17 1994/11/25 07:58:16 davidg Exp $ + * $Id: init_main.c,v 1.18 1995/02/20 22:23:09 davidg Exp $ */ #include <sys/param.h> @@ -44,6 +44,9 @@ #include <sys/errno.h> #include <sys/exec.h> #include <sys/kernel.h> +#ifdef GPROF +#include <sys/gmon.h> +#endif #include <sys/mount.h> #include <sys/proc.h> #include <sys/resourcevar.h> @@ -64,6 +67,7 @@ #include <machine/cpu.h> #include <vm/vm.h> +#include <vm/vm_pageout.h> #ifdef HPFPLIB char copyright[] = @@ -125,10 +129,6 @@ main(framep) register struct filedesc0 *fdp; register int i; int s, rval[2]; - extern int (*mountroot) __P((void)); - extern void roundrobin __P((void *)); - extern void schedcpu __P((void *)); - extern struct sysentvec aout_sysvec; /* * Initialize the current process pointer (curproc) before @@ -445,7 +445,7 @@ start_init(p, framep) * Now try to exec the program. If can't for any reason * other than it doesn't exist, complain. */ - if ((error = execve(p, &args, &retval)) == 0) + if ((error = execve(p, &args, &retval[0])) == 0) return; if (error != ENOENT) printf("exec %s: error %d\n", path, error); diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index c8b23f0..4173a45 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -2,11 +2,10 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from $Id: syscalls.master,v 1.12 1994/12/14 17:57:23 wollman Exp $ + * created from $Id: syscalls.master,v 1.13 1995/03/04 03:24:26 davidg Exp $ */ #include <sys/param.h> -#include <sys/systm.h> #include <sys/sysent.h> int nosys(); diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index c1ff1bd..62d2bcb 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_clock.c 8.5 (Berkeley) 1/21/94 - * $Id: kern_clock.c,v 1.10 1994/10/16 03:52:12 wollman Exp $ + * $Id: kern_clock.c,v 1.11 1994/12/12 11:58:46 bde Exp $ */ /* Portions of this software are covered by the following: */ @@ -415,8 +415,6 @@ hardclock(frame) register struct callout *p1; register struct proc *p; register int needsoft; - extern int tickdelta; - extern long timedelta; /* * Update real-time timeout queue. diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 4057384..2d1593a 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: kern_exec.c,v 1.14 1995/03/01 04:09:50 davidg Exp $ + * $Id: kern_exec.c,v 1.15 1995/03/10 08:44:20 davidg Exp $ */ #include <sys/param.h> @@ -60,7 +60,6 @@ static int exec_check_permissions(struct image_params *); * execsw_set is constructed for us by the linker. Each of the items * is a pointer to a `const struct execsw', hence the double pointer here. */ -extern const struct linker_set execsw_set; const struct execsw **execsw = (const struct execsw **)&execsw_set.ls_items[0]; /* diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index e3cee98..3a8102c 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_exit.c 8.7 (Berkeley) 2/12/94 - * $Id: kern_exit.c,v 1.12 1994/10/27 05:21:39 phk Exp $ + * $Id: kern_exit.c,v 1.13 1994/12/28 06:15:07 davidg Exp $ */ #include <sys/param.h> @@ -281,16 +281,6 @@ done: cpu_exit(p); } -struct wait_args { - int pid; - int *status; - int options; - struct rusage *rusage; -#if defined(COMPAT_43) || defined(COMPAT_IBCS2) - int compat; /* pseudo */ -#endif -}; - #if defined(COMPAT_43) || defined(COMPAT_IBCS2) #if defined(hp300) || defined(luna68k) #include <machine/frame.h> diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 4f5a754..0e2ba90 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_fork.c 8.6 (Berkeley) 4/8/94 - * $Id: kern_fork.c,v 1.9 1994/10/10 01:00:43 phk Exp $ + * $Id: kern_fork.c,v 1.10 1995/01/21 15:08:57 bde Exp $ */ #include <sys/param.h> @@ -55,9 +55,6 @@ static int fork1(struct proc *, int, int *); -struct fork_args { - int dummy; -}; /* ARGSUSED */ int fork(p, uap, retval) diff --git a/sys/kern/kern_lkm.c b/sys/kern/kern_lkm.c index 61aac0e..b2e568c 100644 --- a/sys/kern/kern_lkm.c +++ b/sys/kern/kern_lkm.c @@ -496,7 +496,6 @@ _lkm_syscall(lkmtp, cmd) struct lkm_syscall *args = lkmtp->private.lkm_syscall; int i; int err = 0; - extern struct sysentvec aout_sysvec; switch(cmd) { case LKM_E_LOAD: @@ -566,7 +565,6 @@ _lkm_vfs(lkmtp, cmd) { struct lkm_vfs *args = lkmtp->private.lkm_vfs; struct vfsconf *vfc = args->lkm_vfsconf; - extern struct vfsconf void_vfsconf; int i; int err = 0; @@ -791,7 +789,6 @@ _lkm_exec(lkmtp, cmd) struct lkm_exec *args = lkmtp->private.lkm_exec; int i; int err = 0; - extern const struct linker_set execsw_set; const struct execsw **execsw = (const struct execsw **)&execsw_set.ls_items[0]; diff --git a/sys/kern/kern_physio.c b/sys/kern/kern_physio.c index ad88ab6..f8f4db8 100644 --- a/sys/kern/kern_physio.c +++ b/sys/kern/kern_physio.c @@ -16,7 +16,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: kern_physio.c,v 1.8 1994/09/25 19:33:40 phk Exp $ + * $Id: kern_physio.c,v 1.9 1995/01/09 16:04:51 davidg Exp $ */ #include <sys/param.h> @@ -30,7 +30,7 @@ static void physwakeup(); int physio(strategy, bp, dev, rw, minp, uio) - int (*strategy)(); + d_strategy_t *strategy; struct buf *bp; dev_t dev; int rw; diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 7a59349..08ff425 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_sig.c 8.7 (Berkeley) 4/18/94 - * $Id: kern_sig.c,v 1.8 1994/11/06 11:13:02 ache Exp $ + * $Id: kern_sig.c,v 1.9 1995/01/29 01:19:12 ats Exp $ */ #define SIGPROP /* include signal properties table */ @@ -65,7 +65,6 @@ void setsigvec __P((struct proc *, int, struct sigaction *)); void stop __P((struct proc *)); -void sigexit __P((struct proc *, int)); /* * Can process p, with pcred pc, send the signal signum to process q? diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index f3724ff..4c977c7 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_synch.c 8.6 (Berkeley) 1/21/94 - * $Id: kern_synch.c,v 1.8 1994/10/18 06:55:39 davidg Exp $ + * $Id: kern_synch.c,v 1.9 1994/12/12 06:04:27 davidg Exp $ */ #include <sys/param.h> @@ -57,6 +57,8 @@ u_char curpriority; /* usrpri of curproc */ int lbolt; /* once a second sleep address */ +void endtsleep __P((void *)); + /* * Force switch among equal priority processes every 100ms. */ @@ -287,8 +289,6 @@ tsleep(ident, priority, wmesg, timo) register struct slpque *qp; register s; int sig, catch = priority & PCATCH; - extern int cold; - void endtsleep __P((void *)); #ifdef KTRACE if (KTRPOINT(p, KTR_CSW)) @@ -415,7 +415,6 @@ sleep(ident, priority) register struct proc *p = curproc; register struct slpque *qp; register s; - extern int cold; #ifdef DIAGNOSTIC if (priority > PZERO) { diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 6143930..8d0e95b 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94 - * $Id: kern_sysctl.c,v 1.21 1994/12/28 06:15:08 davidg Exp $ + * $Id: kern_sysctl.c,v 1.22 1995/02/20 19:42:35 guido Exp $ */ /* @@ -192,7 +192,6 @@ kern_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) struct proc *p; { int error, level, inthostid; - extern char ostype[], osrelease[]; /* all sysctl names at this level are terminal */ if (namelen != 1 && !(name[0] == KERN_PROC || name[0] == KERN_PROF @@ -313,9 +312,6 @@ hw_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) size_t newlen; struct proc *p; { - extern char machine[], cpu_model[]; - extern int hw_float; - /* almost all sysctl names at this level are terminal */ if (namelen != 1 && name[0] != HW_DEVCONF) return (ENOTDIR); /* overloaded */ diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index c1ff1bd..62d2bcb 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_clock.c 8.5 (Berkeley) 1/21/94 - * $Id: kern_clock.c,v 1.10 1994/10/16 03:52:12 wollman Exp $ + * $Id: kern_clock.c,v 1.11 1994/12/12 11:58:46 bde Exp $ */ /* Portions of this software are covered by the following: */ @@ -415,8 +415,6 @@ hardclock(frame) register struct callout *p1; register struct proc *p; register int needsoft; - extern int tickdelta; - extern long timedelta; /* * Update real-time timeout queue. diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 4249ca8..5ab24de 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)kern_time.c 8.1 (Berkeley) 6/10/93 - * $Id: kern_time.c,v 1.5 1994/10/02 17:35:20 phk Exp $ + * $Id: kern_time.c,v 1.6 1995/02/14 06:33:53 phk Exp $ */ #include <sys/param.h> @@ -43,7 +43,6 @@ #include <sys/vnode.h> #include <machine/cpu.h> -#include <machine/clock.h> /* * Time of day and interval timer support. diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index c1ff1bd..62d2bcb 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_clock.c 8.5 (Berkeley) 1/21/94 - * $Id: kern_clock.c,v 1.10 1994/10/16 03:52:12 wollman Exp $ + * $Id: kern_clock.c,v 1.11 1994/12/12 11:58:46 bde Exp $ */ /* Portions of this software are covered by the following: */ @@ -415,8 +415,6 @@ hardclock(frame) register struct callout *p1; register struct proc *p; register int needsoft; - extern int tickdelta; - extern long timedelta; /* * Update real-time timeout queue. diff --git a/sys/kern/makesyscalls.sh b/sys/kern/makesyscalls.sh index a4875fb..abe49ba 100644 --- a/sys/kern/makesyscalls.sh +++ b/sys/kern/makesyscalls.sh @@ -1,6 +1,6 @@ #! /bin/sh - # @(#)makesyscalls.sh 8.1 (Berkeley) 6/10/93 -# $Id: makesyscalls.sh,v 1.10 1994/11/06 21:57:16 ats Exp $ +# $Id: makesyscalls.sh,v 1.11 1995/02/14 19:22:29 sos Exp $ set -e @@ -55,7 +55,6 @@ awk < $1 " NR == 1 { printf " * created from%s\n */\n\n", $0 > sysdcl printf "#include <sys/param.h>\n" > sysdcl - printf "#include <sys/systm.h>\n" > sysdcl printf "#include <sys/sysent.h>\n\n" > sysdcl printf "struct sysent sysent[] = {\n" > sysent diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index db533db..d9ed51d 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)subr_prf.c 8.3 (Berkeley) 1/21/94 - * $Id: subr_prf.c,v 1.9 1994/12/30 12:17:42 bde Exp $ + * $Id: subr_prf.c,v 1.10 1995/02/19 15:02:26 bde Exp $ */ #include <sys/param.h> @@ -491,7 +491,6 @@ putchar(c, flags, tp) int flags; struct tty *tp; { - extern int msgbufmapped; register struct msgbuf *mbp; if (panicstr) diff --git a/sys/kern/subr_prof.c b/sys/kern/subr_prof.c index e0cdb2f..3c8ef38 100644 --- a/sys/kern/subr_prof.c +++ b/sys/kern/subr_prof.c @@ -31,14 +31,17 @@ * SUCH DAMAGE. * * @(#)subr_prof.c 8.3 (Berkeley) 9/23/93 - * $Id: subr_prof.c,v 1.4 1994/09/21 21:58:39 bde Exp $ + * $Id: subr_prof.c,v 1.5 1995/01/29 03:03:23 bde Exp $ */ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> #include <sys/proc.h> +#include <vm/vm.h> +#include <sys/sysctl.h> #include <sys/user.h> + #include <machine/cpu.h> #ifdef GPROF diff --git a/sys/kern/subr_rlist.c b/sys/kern/subr_rlist.c index ed4a5a9..c64b685 100644 --- a/sys/kern/subr_rlist.c +++ b/sys/kern/subr_rlist.c @@ -54,7 +54,7 @@ * functioning of this software, nor does the author assume any responsibility * for damages incurred with its use. * - * $Id: subr_rlist.c,v 1.7 1994/10/02 17:35:23 phk Exp $ + * $Id: subr_rlist.c,v 1.8 1995/01/31 06:48:53 davidg Exp $ */ #include <sys/param.h> @@ -64,10 +64,9 @@ #include <sys/rlist.h> #include <sys/proc.h> #include <vm/vm.h> +#include <vm/vm_kern.h> #include <vm/vm_map.h> -extern vm_map_t kernel_map; - /* * Resource lists. */ @@ -83,7 +82,6 @@ rlist_malloc() struct rlist *rl; int i; while( rlist_count < RLIST_MIN) { - extern vm_map_t kmem_map; int s = splhigh(); rl = (struct rlist *)kmem_malloc(kmem_map, NBPG, M_WAITOK); splx(s); diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index f98022b..2e64edd 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $Id: trap.c,v 1.47 1995/02/10 06:43:47 davidg Exp $ + * $Id: trap.c,v 1.48 1995/02/14 19:20:31 sos Exp $ */ /* @@ -56,10 +56,12 @@ #include <vm/vm_param.h> #include <vm/pmap.h> +#include <vm/vm_kern.h> #include <vm/vm_map.h> #include <vm/vm_page.h> #include <machine/cpu.h> +#include <machine/md_var.h> #include <machine/psl.h> #include <machine/reg.h> #include <machine/trap.h> @@ -302,8 +304,6 @@ trap(frame) */ #define MAYBE_DORETI_FAULT(where, whereto) \ do { \ - extern void where(void) __asm(__STRING(where)); \ - extern void whereto(void) __asm(__STRING(whereto)); \ if (frame.tf_eip == (int)where) { \ frame.tf_eip = (int)whereto; \ return; \ @@ -398,7 +398,6 @@ trap_pfault(frame, usermode) vm_map_t map = 0; int rv = 0; vm_prot_t ftype; - extern vm_map_t kernel_map; int eva; struct proc *p = curproc; diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index 3d20a83..5221a7f 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sys_process.c,v 1.10 1995/02/16 00:41:16 davidg Exp $ + * $Id: sys_process.c,v 1.11 1995/02/19 02:50:31 davidg Exp $ */ #include <sys/param.h> @@ -304,7 +304,7 @@ ptrace(curp, uap, retval) if (uap->addr != (caddr_t)1) { fill_eproc (p, &p->p_addr->u_kproc.kp_eproc); - if ((error = ptrace_set_pc (p, uap->addr))) + if ((error = ptrace_set_pc (p, (u_int)uap->addr))) return error; } diff --git a/sys/kern/syscalls.c b/sys/kern/syscalls.c index 7bccb13..2f1a468 100644 --- a/sys/kern/syscalls.c +++ b/sys/kern/syscalls.c @@ -2,7 +2,7 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from $Id: syscalls.master,v 1.12 1994/12/14 17:57:23 wollman Exp $ + * created from $Id: syscalls.master,v 1.13 1995/03/04 03:24:26 davidg Exp $ */ char *syscallnames[] = { diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 9edf66a..ffef354 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)tty.c 8.8 (Berkeley) 1/21/94 - * $Id: tty.c,v 1.34 1995/02/28 00:21:03 pst Exp $ + * $Id: tty.c,v 1.35 1995/02/28 23:20:11 ache Exp $ */ #include "snp.h" @@ -195,7 +195,6 @@ int ttyclose(tp) register struct tty *tp; { - extern struct tty *constty; /* Temporary virtual console. */ int s; s = spltty(); @@ -662,8 +661,6 @@ ttioctl(tp, cmd, data, flag) int cmd, flag; void *data; { - extern struct tty *constty; /* Temporary virtual console. */ - extern int nlinesw; register struct proc *p; int s, error; diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index e2ad45a..d9a44e5 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)uipc_syscalls.c 8.4 (Berkeley) 2/21/94 - * $Id: uipc_syscalls.c,v 1.3 1994/08/02 07:43:10 davidg Exp $ + * $Id: uipc_syscalls.c,v 1.4 1994/10/02 17:35:35 phk Exp $ */ #include <sys/param.h> @@ -47,6 +47,7 @@ #include <sys/socket.h> #include <sys/socketvar.h> #include <sys/signalvar.h> +#include <sys/un.h> #ifdef KTRACE #include <sys/ktrace.h> #endif diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 5fb391a..5b7bc76 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -18,7 +18,7 @@ * 5. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: vfs_bio.c,v 1.34 1995/03/04 15:16:07 davidg Exp $ + * $Id: vfs_bio.c,v 1.35 1995/03/07 19:53:27 davidg Exp $ */ /* @@ -39,6 +39,7 @@ #include <sys/proc.h> #include <sys/vnode.h> #include <vm/vm.h> +#include <vm/vm_kern.h> #include <vm/vm_pageout.h> #include <vm/vm_page.h> #include <vm/vm_object.h> @@ -55,12 +56,9 @@ int nbuf; /* number of buffer headers calculated * elsewhere */ struct swqueue bswlist; -extern vm_map_t buffer_map, io_map, kernel_map, pager_map; - void vm_hold_free_pages(struct buf * bp, vm_offset_t from, vm_offset_t to); void vm_hold_load_pages(struct buf * bp, vm_offset_t from, vm_offset_t to); void vfs_dirty_pages(struct buf * bp); -void vfs_busy_pages(struct buf *, int clear_modify); int needsbuffer; diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c index 881605d..39eab49 100644 --- a/sys/kern/vfs_cluster.c +++ b/sys/kern/vfs_cluster.c @@ -33,7 +33,7 @@ * SUCH DAMAGE. * * @(#)vfs_cluster.c 8.7 (Berkeley) 2/13/94 - * $Id: vfs_cluster.c,v 1.11 1995/03/02 19:36:50 davidg Exp $ + * $Id: vfs_cluster.c,v 1.12 1995/03/04 03:24:28 davidg Exp $ */ #include <sys/param.h> @@ -65,7 +65,6 @@ struct ctldebug debug13 = {"doreallocblks", &doreallocblks}; */ struct buf *cluster_rbuild __P((struct vnode *, u_quad_t, struct buf *, daddr_t, daddr_t, long, int, long)); -void cluster_wbuild __P((struct vnode *, struct buf *, long, daddr_t, int, daddr_t)); struct cluster_save *cluster_collectbufs __P((struct vnode *, struct buf *)); int totreads; @@ -508,7 +507,7 @@ redo: --len; } - pb = (struct buf *) trypbuf(); + pb = trypbuf(); /* Get more memory for current buffer */ if (len <= 1 || pb == 0) { relpbuf(pb); @@ -528,7 +527,7 @@ redo: } tbp->b_flags |= B_BUSY; last_bp = 0; - pb = (struct buf *) trypbuf(); + pb = trypbuf(); if( pb == 0) { bawrite(tbp); return; diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index c46ec68..7be57e9 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94 - * $Id: vfs_subr.c,v 1.21 1995/03/10 21:18:24 davidg Exp $ + * $Id: vfs_subr.c,v 1.22 1995/03/11 22:29:07 davidg Exp $ */ /* @@ -96,8 +96,6 @@ int desiredvnodes; void vntblinit() { - extern int vm_object_cache_max; - desiredvnodes = maxproc + vm_object_cache_max; TAILQ_INIT(&vnode_free_list); diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index eef1fce..0596362 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94 - * $Id: vfs_syscalls.c,v 1.17 1995/02/13 13:45:04 davidg Exp $ + * $Id: vfs_syscalls.c,v 1.18 1995/02/28 02:52:48 davidg Exp $ */ #include <sys/param.h> @@ -53,6 +53,10 @@ #include <sys/malloc.h> #include <sys/dirent.h> +#ifdef UNION +#include <miscfs/union/union.h> +#endif + #include <vm/vm.h> #include <sys/sysctl.h> @@ -308,9 +312,6 @@ int syncprt = 0; struct ctldebug debug0 = { "syncprt", &syncprt }; #endif -struct sync_args { - int dummy; -}; /* ARGSUSED */ int sync(p, uap, retval) @@ -622,7 +623,6 @@ open(p, uap, retval) int type, indx, error; struct flock lf; struct nameidata nd; - extern struct fileops vnops; error = falloc(p, &nfp, &indx); if (error) @@ -2126,9 +2126,6 @@ unionread: #ifdef UNION { - extern int (**union_vnodeop_p)(); - extern struct vnode *union_lowervp __P((struct vnode *)); - if ((uap->count == auio.uio_resid) && (vp->v_op == union_vnodeop_p)) { struct vnode *tvp = vp; diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index c46ec68..7be57e9 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94 - * $Id: vfs_subr.c,v 1.21 1995/03/10 21:18:24 davidg Exp $ + * $Id: vfs_subr.c,v 1.22 1995/03/11 22:29:07 davidg Exp $ */ /* @@ -96,8 +96,6 @@ int desiredvnodes; void vntblinit() { - extern int vm_object_cache_max; - desiredvnodes = maxproc + vm_object_cache_max; TAILQ_INIT(&vnode_free_list); diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index eef1fce..0596362 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94 - * $Id: vfs_syscalls.c,v 1.17 1995/02/13 13:45:04 davidg Exp $ + * $Id: vfs_syscalls.c,v 1.18 1995/02/28 02:52:48 davidg Exp $ */ #include <sys/param.h> @@ -53,6 +53,10 @@ #include <sys/malloc.h> #include <sys/dirent.h> +#ifdef UNION +#include <miscfs/union/union.h> +#endif + #include <vm/vm.h> #include <sys/sysctl.h> @@ -308,9 +312,6 @@ int syncprt = 0; struct ctldebug debug0 = { "syncprt", &syncprt }; #endif -struct sync_args { - int dummy; -}; /* ARGSUSED */ int sync(p, uap, retval) @@ -622,7 +623,6 @@ open(p, uap, retval) int type, indx, error; struct flock lf; struct nameidata nd; - extern struct fileops vnops; error = falloc(p, &nfp, &indx); if (error) @@ -2126,9 +2126,6 @@ unionread: #ifdef UNION { - extern int (**union_vnodeop_p)(); - extern struct vnode *union_lowervp __P((struct vnode *)); - if ((uap->count == auio.uio_resid) && (vp->v_op == union_vnodeop_p)) { struct vnode *tvp = vp; |