diff options
226 files changed, 1186 insertions, 768 deletions
diff --git a/sys/alpha/alpha/interrupt.c b/sys/alpha/alpha/interrupt.c index ead015b..0da3dff 100644 --- a/sys/alpha/alpha/interrupt.c +++ b/sys/alpha/alpha/interrupt.c @@ -41,18 +41,19 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/proc.h> -#include <sys/vmmeter.h> #include <sys/bus.h> -#include <sys/malloc.h> #include <sys/interrupt.h> #include <sys/ipl.h> #include <sys/kernel.h> #include <sys/kthread.h> #include <sys/ktr.h> +#include <sys/lock.h> +#include <sys/malloc.h> #include <sys/mutex.h> +#include <sys/proc.h> #include <sys/smp.h> #include <sys/unistd.h> +#include <sys/vmmeter.h> #include <machine/reg.h> #include <machine/frame.h> diff --git a/sys/alpha/alpha/procfs_machdep.c b/sys/alpha/alpha/procfs_machdep.c index c0766ca..e18353a 100644 --- a/sys/alpha/alpha/procfs_machdep.c +++ b/sys/alpha/alpha/procfs_machdep.c @@ -66,20 +66,21 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/ptrace.h> +#include <sys/user.h> #include <sys/vnode.h> -#include <machine/reg.h> + #include <machine/md_var.h> +#include <machine/reg.h> #include <miscfs/procfs/procfs.h> #include <vm/vm.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> -#include <sys/user.h> - int procfs_read_regs(p, regs) struct proc *p; diff --git a/sys/alpha/alpha/sys_machdep.c b/sys/alpha/alpha/sys_machdep.c index 61076b7..ea0f49c 100644 --- a/sys/alpha/alpha/sys_machdep.c +++ b/sys/alpha/alpha/sys_machdep.c @@ -37,18 +37,18 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/sysproto.h> -#include <sys/sysent.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> +#include <sys/sysent.h> +#include <sys/sysproto.h> +#include <sys/user.h> #include <vm/vm.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> #include <vm/vm_extern.h> -#include <sys/user.h> - #include <machine/cpu.h> #include <machine/sysarch.h> diff --git a/sys/alpha/linux/linux_machdep.c b/sys/alpha/linux/linux_machdep.c index 98b3918..40740b4 100644 --- a/sys/alpha/linux/linux_machdep.c +++ b/sys/alpha/linux/linux_machdep.c @@ -29,19 +29,20 @@ */ #include <sys/param.h> +#include <sys/systm.h> +#include <sys/lock.h> #include <sys/mman.h> #include <sys/mount.h> +#include <sys/mutex.h> +#include <sys/proc.h> #include <sys/sysproto.h> -#include <sys/systm.h> #include <sys/unistd.h> +#include <sys/user.h> #include <vm/vm.h> #include <vm/pmap.h> #include <vm/vm_map.h> -#include <sys/proc.h> -#include <sys/user.h> - #include <alpha/linux/linux.h> #include <alpha/linux/linux_proto.h> #include <compat/linux/linux_signal.h> diff --git a/sys/alpha/linux/linux_sysvec.c b/sys/alpha/linux/linux_sysvec.c index 5f9893b..f7a0edb 100644 --- a/sys/alpha/linux/linux_sysvec.c +++ b/sys/alpha/linux/linux_sysvec.c @@ -37,20 +37,24 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/proc.h> -#include <sys/sysent.h> +#include <sys/exec.h> #include <sys/imgact.h> #include <sys/imgact_aout.h> #include <sys/imgact_elf.h> -#include <sys/signalvar.h> +#include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> +#include <sys/module.h> +#include <sys/mutex.h> +#include <sys/proc.h> +#include <sys/signalvar.h> +#include <sys/sysent.h> + #include <vm/vm.h> #include <vm/vm_param.h> #include <vm/vm_page.h> #include <vm/vm_extern.h> -#include <sys/exec.h> -#include <sys/kernel.h> -#include <sys/module.h> + #include <machine/cpu.h> #include <machine/md_var.h> diff --git a/sys/alpha/osf1/osf1_misc.c b/sys/alpha/osf1/osf1_misc.c index 90dbc62..707e640 100644 --- a/sys/alpha/osf1/osf1_misc.c +++ b/sys/alpha/osf1/osf1_misc.c @@ -35,50 +35,48 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/namei.h> -#include <sys/proc.h> -#include <sys/file.h> -#include <sys/stat.h> +#include <sys/bus.h> +#include <sys/dkstat.h> +#include <sys/exec.h> +#include <sys/fcntl.h> #include <sys/filedesc.h> +#include <sys/imgact.h> #include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> +#include <sys/file.h> /* Must come after sys/malloc.h */ #include <sys/mman.h> +#include <sys/module.h> #include <sys/mount.h> -#include <sys/signal.h> -#include <sys/signalvar.h> +#include <sys/mutex.h> +#include <sys/namei.h> +#include <sys/param.h> +#include <sys/proc.h> #include <sys/reboot.h> -#include <sys/exec.h> -#include <sys/vnode.h> -#include <sys/socketvar.h> -#include <sys/sysproto.h> -#include <sys/sysent.h> #include <sys/resource.h> +#include <sys/resourcevar.h> +#include <sys/selinfo.h> +#include <sys/pipe.h> /* Must come after sys/selinfo.h */ +#include <sys/signal.h> #include <sys/signalvar.h> -#include <sys/fcntl.h> #include <sys/socket.h> -#include <sys/pipe.h> +#include <sys/socketvar.h> +#include <sys/stat.h> +#include <sys/sysctl.h> +#include <sys/sysent.h> +#include <sys/sysproto.h> +#include <sys/systm.h> +#include <sys/unistd.h> +#include <sys/user.h> +#include <sys/utsname.h> +#include <sys/vnode.h> + +#include <alpha/osf1/exec_ecoff.h> #include <alpha/osf1/osf1_signal.h> #include <alpha/osf1/osf1_proto.h> #include <alpha/osf1/osf1_syscall.h> #include <alpha/osf1/osf1_util.h> #include <alpha/osf1/osf1.h> -#include <sys/proc.h> -#include <sys/module.h> -#include <sys/bus.h> - -#include <vm/vm.h> -#include <alpha/osf1/exec_ecoff.h> -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/resourcevar.h> -#include <sys/exec.h> -#include <sys/mman.h> -#include <sys/imgact.h> - -#include <sys/kernel.h> -#include <sys/lock.h> -#include <sys/vnode.h> -#include <sys/unistd.h> #include <vm/vm.h> #include <vm/vm_kern.h> @@ -86,17 +84,10 @@ #include <vm/pmap.h> #include <vm/vm_map.h> #include <vm/vm_extern.h> -#include <alpha/osf1/exec_ecoff.h> -#include <sys/user.h> #include <machine/cpu.h> #include <machine/cpuconf.h> #include <machine/fpu.h> - -#include <sys/sysctl.h> -#include <sys/utsname.h> -#include <sys/dkstat.h> - #include <machine/rpb.h> static void cvtstat2osf1 __P((struct stat *, struct osf1_stat *)); diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c index 6ec2738..91dbcad 100644 --- a/sys/amd64/amd64/fpu.c +++ b/sys/amd64/amd64/fpu.c @@ -43,11 +43,13 @@ #include <sys/bus.h> #include <sys/ipl.h> #include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/module.h> -#include <sys/sysctl.h> -#include <sys/proc.h> #include <sys/mutex.h> +#include <sys/mutex.h> +#include <sys/proc.h> +#include <sys/sysctl.h> #include <machine/bus.h> #include <sys/rman.h> #ifdef NPX_DEBUG diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 21e6b6e..ff602c4 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -34,29 +34,29 @@ #endif #include <sys/param.h> -#include <sys/bus.h> #include <sys/systm.h> +#include <sys/bus.h> +#include <sys/cons.h> /* cngetc() */ +#include <sys/dkstat.h> +#ifdef GPROF +#include <sys/gmon.h> +#endif #include <sys/kernel.h> -#include <sys/proc.h> -#include <sys/sysctl.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/memrange.h> #include <sys/mutex.h> +#include <sys/proc.h> #include <sys/smp.h> -#include <sys/dkstat.h> -#include <sys/cons.h> /* cngetc() */ +#include <sys/sysctl.h> +#include <sys/user.h> #include <vm/vm.h> #include <vm/vm_param.h> #include <vm/pmap.h> #include <vm/vm_kern.h> #include <vm/vm_extern.h> -#include <sys/lock.h> #include <vm/vm_map.h> -#include <sys/user.h> -#ifdef GPROF -#include <sys/gmon.h> -#endif #include <machine/apic.h> #include <machine/atomic.h> diff --git a/sys/amd64/amd64/mptable.c b/sys/amd64/amd64/mptable.c index 21e6b6e..ff602c4 100644 --- a/sys/amd64/amd64/mptable.c +++ b/sys/amd64/amd64/mptable.c @@ -34,29 +34,29 @@ #endif #include <sys/param.h> -#include <sys/bus.h> #include <sys/systm.h> +#include <sys/bus.h> +#include <sys/cons.h> /* cngetc() */ +#include <sys/dkstat.h> +#ifdef GPROF +#include <sys/gmon.h> +#endif #include <sys/kernel.h> -#include <sys/proc.h> -#include <sys/sysctl.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/memrange.h> #include <sys/mutex.h> +#include <sys/proc.h> #include <sys/smp.h> -#include <sys/dkstat.h> -#include <sys/cons.h> /* cngetc() */ +#include <sys/sysctl.h> +#include <sys/user.h> #include <vm/vm.h> #include <vm/vm_param.h> #include <vm/pmap.h> #include <vm/vm_kern.h> #include <vm/vm_extern.h> -#include <sys/lock.h> #include <vm/vm_map.h> -#include <sys/user.h> -#ifdef GPROF -#include <sys/gmon.h> -#endif #include <machine/apic.h> #include <machine/atomic.h> diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 5c5b0bb..93807ee 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -74,15 +74,16 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/proc.h> -#include <sys/msgbuf.h> -#include <sys/vmmeter.h> +#include <sys/lock.h> #include <sys/mman.h> +#include <sys/msgbuf.h> +#include <sys/proc.h> #include <sys/sx.h> +#include <sys/user.h> +#include <sys/vmmeter.h> #include <vm/vm.h> #include <vm/vm_param.h> -#include <sys/lock.h> #include <vm/vm_kern.h> #include <vm/vm_page.h> #include <vm/vm_map.h> @@ -92,8 +93,6 @@ #include <vm/vm_pager.h> #include <vm/vm_zone.h> -#include <sys/user.h> - #include <machine/cputypes.h> #include <machine/md_var.h> #include <machine/specialreg.h> diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c index 5ed16ab..ea56e1d 100644 --- a/sys/amd64/amd64/sys_machdep.c +++ b/sys/amd64/amd64/sys_machdep.c @@ -37,20 +37,20 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/sysproto.h> #include <sys/ipl.h> +#include <sys/lock.h> #include <sys/malloc.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/smp.h> +#include <sys/sysproto.h> +#include <sys/user.h> #include <vm/vm.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> #include <vm/vm_extern.h> -#include <sys/user.h> - #include <machine/cpu.h> #include <machine/pcb_ext.h> /* pcb.h included by sys/user.h */ #include <machine/sysarch.h> diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h index 21e6b6e..ff602c4 100644 --- a/sys/amd64/include/mptable.h +++ b/sys/amd64/include/mptable.h @@ -34,29 +34,29 @@ #endif #include <sys/param.h> -#include <sys/bus.h> #include <sys/systm.h> +#include <sys/bus.h> +#include <sys/cons.h> /* cngetc() */ +#include <sys/dkstat.h> +#ifdef GPROF +#include <sys/gmon.h> +#endif #include <sys/kernel.h> -#include <sys/proc.h> -#include <sys/sysctl.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/memrange.h> #include <sys/mutex.h> +#include <sys/proc.h> #include <sys/smp.h> -#include <sys/dkstat.h> -#include <sys/cons.h> /* cngetc() */ +#include <sys/sysctl.h> +#include <sys/user.h> #include <vm/vm.h> #include <vm/vm_param.h> #include <vm/pmap.h> #include <vm/vm_kern.h> #include <vm/vm_extern.h> -#include <sys/lock.h> #include <vm/vm_map.h> -#include <sys/user.h> -#ifdef GPROF -#include <sys/gmon.h> -#endif #include <machine/apic.h> #include <machine/atomic.h> diff --git a/sys/amd64/isa/intr_machdep.c b/sys/amd64/isa/intr_machdep.c index 99f9761..2e9eabc3 100644 --- a/sys/amd64/isa/intr_machdep.c +++ b/sys/amd64/isa/intr_machdep.c @@ -42,23 +42,24 @@ #include "opt_mca.h" #include <sys/param.h> -#include <sys/bus.h> -#include <sys/proc.h> -#include <sys/systm.h> -#include <sys/syslog.h> +#include <sys/bus.h> +#include <sys/errno.h> +#include <sys/interrupt.h> #include <sys/ipl.h> #include <sys/kernel.h> #include <sys/kthread.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/module.h> #include <sys/mutex.h> +#include <sys/proc.h> +#include <sys/syslog.h> +#include <sys/systm.h> #include <sys/unistd.h> -#include <sys/errno.h> -#include <sys/interrupt.h> + #include <machine/md_var.h> #include <machine/segments.h> #include <machine/intrcnt.h> -#include <sys/bus.h> #if defined(APIC_IO) #include <machine/smptests.h> /** FAST_HI */ diff --git a/sys/amd64/isa/nmi.c b/sys/amd64/isa/nmi.c index 99f9761..2e9eabc3 100644 --- a/sys/amd64/isa/nmi.c +++ b/sys/amd64/isa/nmi.c @@ -42,23 +42,24 @@ #include "opt_mca.h" #include <sys/param.h> -#include <sys/bus.h> -#include <sys/proc.h> -#include <sys/systm.h> -#include <sys/syslog.h> +#include <sys/bus.h> +#include <sys/errno.h> +#include <sys/interrupt.h> #include <sys/ipl.h> #include <sys/kernel.h> #include <sys/kthread.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/module.h> #include <sys/mutex.h> +#include <sys/proc.h> +#include <sys/syslog.h> +#include <sys/systm.h> #include <sys/unistd.h> -#include <sys/errno.h> -#include <sys/interrupt.h> + #include <machine/md_var.h> #include <machine/segments.h> #include <machine/intrcnt.h> -#include <sys/bus.h> #if defined(APIC_IO) #include <machine/smptests.h> /** FAST_HI */ diff --git a/sys/amd64/isa/npx.c b/sys/amd64/isa/npx.c index 6ec2738..91dbcad 100644 --- a/sys/amd64/isa/npx.c +++ b/sys/amd64/isa/npx.c @@ -43,11 +43,13 @@ #include <sys/bus.h> #include <sys/ipl.h> #include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/module.h> -#include <sys/sysctl.h> -#include <sys/proc.h> #include <sys/mutex.h> +#include <sys/mutex.h> +#include <sys/proc.h> +#include <sys/sysctl.h> #include <machine/bus.h> #include <sys/rman.h> #ifdef NPX_DEBUG diff --git a/sys/coda/coda_fbsd.c b/sys/coda/coda_fbsd.c index 8111691..c92b482 100644 --- a/sys/coda/coda_fbsd.c +++ b/sys/coda/coda_fbsd.c @@ -35,12 +35,13 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/conf.h> +#include <sys/fcntl.h> #include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> -#include <sys/fcntl.h> #include <sys/ucred.h> #include <sys/vnode.h> -#include <sys/conf.h> #include <vm/vm.h> #include <vm/vnode_pager.h> diff --git a/sys/coda/coda_namecache.c b/sys/coda/coda_namecache.c index 729c0ad..3b73a67 100644 --- a/sys/coda/coda_namecache.c +++ b/sys/coda/coda_namecache.c @@ -77,14 +77,12 @@ */ #include <sys/param.h> +#include <sys/systm.h> #include <sys/errno.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/ucred.h> -#ifndef insque -#include <sys/systm.h> -#endif /* insque */ - #include <vm/vm.h> #include <vm/vm_object.h> diff --git a/sys/coda/coda_psdev.c b/sys/coda/coda_psdev.c index e6ba198..0d8560f 100644 --- a/sys/coda/coda_psdev.c +++ b/sys/coda/coda_psdev.c @@ -58,15 +58,16 @@ extern int coda_nc_initialized; /* Set if cache has been initialized */ #include <sys/param.h> #include <sys/systm.h> +#include <sys/ioccom.h> #include <sys/kernel.h> -#include <sys/proc.h> +#include <sys/lock.h> #include <sys/malloc.h> -#include <net/radix.h> -#include <sys/socket.h> +#include <sys/file.h> /* must come after sys/malloc.h */ #include <sys/mount.h> -#include <sys/file.h> -#include <sys/ioccom.h> +#include <sys/mutex.h> #include <sys/poll.h> +#include <sys/proc.h> +#include <sys/socket.h> #include <coda/coda.h> #include <coda/cnode.h> diff --git a/sys/coda/coda_subr.c b/sys/coda/coda_subr.c index 8c4406b..84546c1 100644 --- a/sys/coda/coda_subr.c +++ b/sys/coda/coda_subr.c @@ -59,10 +59,10 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> #include <sys/malloc.h> -#include <net/radix.h> -#include <sys/socket.h> #include <sys/mount.h> +#include <sys/socket.h> #include <coda/coda.h> #include <coda/cnode.h> diff --git a/sys/coda/coda_venus.c b/sys/coda/coda_venus.c index 1784e2f..022009e 100644 --- a/sys/coda/coda_venus.c +++ b/sys/coda/coda_venus.c @@ -33,10 +33,12 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/fcntl.h> +#include <sys/ioccom.h> +#include <sys/lock.h> #include <sys/malloc.h> +#include <sys/mutex.h> #include <sys/proc.h> -#include <sys/ioccom.h> -#include <sys/fcntl.h> #include <coda/coda.h> #include <coda/cnode.h> diff --git a/sys/coda/coda_vfsops.c b/sys/coda/coda_vfsops.c index 437e9fd..a640cf4 100644 --- a/sys/coda/coda_vfsops.c +++ b/sys/coda/coda_vfsops.c @@ -48,14 +48,14 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/conf.h> #include <sys/kernel.h> -#include <sys/proc.h> +#include <sys/lock.h> #include <sys/malloc.h> -#include <sys/conf.h> +#include <sys/mount.h> #include <sys/namei.h> -#include <net/radix.h> +#include <sys/proc.h> #include <sys/socket.h> -#include <sys/mount.h> #include <coda/coda.h> #include <coda/cnode.h> diff --git a/sys/coda/coda_vnops.c b/sys/coda/coda_vnops.c index 2619917..1444fb2 100644 --- a/sys/coda/coda_vnops.c +++ b/sys/coda/coda_vnops.c @@ -47,18 +47,19 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/acct.h> +#include <sys/errno.h> +#include <sys/fcntl.h> #include <sys/kernel.h> -#include <sys/proc.h> +#include <sys/lock.h> #include <sys/malloc.h> -#include <net/radix.h> -#include <sys/socket.h> +#include <sys/file.h> /* Must come after sys/malloc.h */ #include <sys/mount.h> -#include <sys/errno.h> -#include <sys/acct.h> -#include <sys/file.h> -#include <sys/fcntl.h> -#include <sys/uio.h> +#include <sys/mutex.h> #include <sys/namei.h> +#include <sys/proc.h> +#include <sys/socket.h> +#include <sys/uio.h> #include <vm/vm.h> #include <vm/vm_object.h> diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index f1c7fb5..2c85740 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -42,18 +42,19 @@ */ #include <sys/param.h> -#include <sys/conf.h> +#include <sys/systm.h> #include <sys/blist.h> +#include <sys/conf.h> #include <sys/dkstat.h> +#include <sys/jail.h> #include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/proc.h> #include <sys/resourcevar.h> #include <sys/sbuf.h> -#include <sys/systm.h> #include <sys/tty.h> #include <sys/vnode.h> -#include <sys/jail.h> #include <vm/vm.h> #include <vm/pmap.h> diff --git a/sys/compat/linprocfs/linprocfs_misc.c b/sys/compat/linprocfs/linprocfs_misc.c index f1c7fb5..2c85740 100644 --- a/sys/compat/linprocfs/linprocfs_misc.c +++ b/sys/compat/linprocfs/linprocfs_misc.c @@ -42,18 +42,19 @@ */ #include <sys/param.h> -#include <sys/conf.h> +#include <sys/systm.h> #include <sys/blist.h> +#include <sys/conf.h> #include <sys/dkstat.h> +#include <sys/jail.h> #include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/proc.h> #include <sys/resourcevar.h> #include <sys/sbuf.h> -#include <sys/systm.h> #include <sys/tty.h> #include <sys/vnode.h> -#include <sys/jail.h> #include <vm/vm.h> #include <vm/pmap.h> diff --git a/sys/compat/linprocfs/linprocfs_subr.c b/sys/compat/linprocfs/linprocfs_subr.c index d48d337..09b449e 100644 --- a/sys/compat/linprocfs/linprocfs_subr.c +++ b/sys/compat/linprocfs/linprocfs_subr.c @@ -43,9 +43,12 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> +#include <sys/malloc.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/vnode.h> -#include <sys/malloc.h> + #include <compat/linprocfs/linprocfs.h> static struct pfsnode *pfshead; diff --git a/sys/compat/linprocfs/linprocfs_vnops.c b/sys/compat/linprocfs/linprocfs_vnops.c index d9ee5da..499e5d4 100644 --- a/sys/compat/linprocfs/linprocfs_vnops.c +++ b/sys/compat/linprocfs/linprocfs_vnops.c @@ -48,22 +48,26 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/time.h> +#include <sys/dirent.h> +#include <sys/fcntl.h> #include <sys/kernel.h> #include <sys/lock.h> -#include <sys/fcntl.h> +#include <sys/malloc.h> +#include <sys/mount.h> +#include <sys/mutex.h> +#include <sys/namei.h> +#include <sys/pioctl.h> #include <sys/proc.h> #include <sys/signalvar.h> #include <sys/sx.h> +#include <sys/time.h> #include <sys/vnode.h> -#include <sys/mount.h> -#include <sys/namei.h> -#include <sys/dirent.h> -#include <sys/malloc.h> + #include <machine/reg.h> + #include <vm/vm_zone.h> + #include <compat/linprocfs/linprocfs.h> -#include <sys/pioctl.h> extern struct vnode *procfs_findtextvp __P((struct proc *)); extern int procfs_kmemaccess __P((struct proc *)); diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 6f246af..0f68ab5 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -32,18 +32,19 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/sysproto.h> +#include <sys/conf.h> +#include <sys/dirent.h> #include <sys/fcntl.h> #include <sys/file.h> #include <sys/filedesc.h> #include <sys/lock.h> -#include <sys/proc.h> -#include <sys/vnode.h> #include <sys/malloc.h> #include <sys/mount.h> -#include <sys/dirent.h> -#include <sys/conf.h> +#include <sys/mutex.h> +#include <sys/proc.h> +#include <sys/sysproto.h> #include <sys/tty.h> +#include <sys/vnode.h> #include <ufs/ufs/extattr.h> #include <ufs/ufs/quota.h> diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 127d5b7..2c7c9b5 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -32,23 +32,25 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/sysproto.h> -#include <sys/kernel.h> -#include <sys/mman.h> -#include <sys/proc.h> #include <sys/fcntl.h> #include <sys/imgact_aout.h> +#include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/mman.h> #include <sys/mount.h> +#include <sys/mutex.h> #include <sys/namei.h> +#include <sys/proc.h> #include <sys/reboot.h> #include <sys/resourcevar.h> +#include <sys/signalvar.h> #include <sys/stat.h> #include <sys/sysctl.h> +#include <sys/sysproto.h> +#include <sys/time.h> #include <sys/unistd.h> #include <sys/vnode.h> #include <sys/wait.h> -#include <sys/time.h> -#include <sys/signalvar.h> #include <vm/vm.h> #include <vm/pmap.h> diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c index 3201da6..8a2f8b3 100644 --- a/sys/compat/linux/linux_signal.c +++ b/sys/compat/linux/linux_signal.c @@ -30,9 +30,11 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/sysproto.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/signalvar.h> +#include <sys/sysproto.h> #include <machine/../linux/linux.h> #include <machine/../linux/linux_proto.h> diff --git a/sys/compat/pecoff/imgact_pecoff.c b/sys/compat/pecoff/imgact_pecoff.c index 6dff6ba..36b4288 100644 --- a/sys/compat/pecoff/imgact_pecoff.c +++ b/sys/compat/pecoff/imgact_pecoff.c @@ -46,14 +46,15 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/proc.h> -#include <sys/sysent.h> #include <sys/imgact.h> -#include <sys/signalvar.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/mman.h> -#include <sys/vnode.h> #include <sys/namei.h> +#include <sys/proc.h> +#include <sys/signalvar.h> +#include <sys/sysent.h> +#include <sys/vnode.h> #include <machine/reg.h> @@ -61,7 +62,6 @@ #include <vm/vm_kern.h> #include <vm/vm_param.h> #include <vm/pmap.h> -#include <sys/lock.h> #include <vm/vm_map.h> #include <vm/vm_object.h> #include <vm/vm_extern.h> diff --git a/sys/compat/svr4/imgact_svr4.c b/sys/compat/svr4/imgact_svr4.c index ae4f7d2..75c3c57 100644 --- a/sys/compat/svr4/imgact_svr4.c +++ b/sys/compat/svr4/imgact_svr4.c @@ -34,14 +34,15 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/resourcevar.h> #include <sys/exec.h> -#include <sys/mman.h> #include <sys/imgact.h> #include <sys/imgact_aout.h> #include <sys/kernel.h> #include <sys/lock.h> +#include <sys/mman.h> +#include <sys/mutex.h> #include <sys/proc.h> +#include <sys/resourcevar.h> #include <sys/vnode.h> #include <vm/vm.h> diff --git a/sys/compat/svr4/svr4_fcntl.c b/sys/compat/svr4/svr4_fcntl.c index c2b865a..4fe760f 100644 --- a/sys/compat/svr4/svr4_fcntl.c +++ b/sys/compat/svr4/svr4_fcntl.c @@ -32,15 +32,17 @@ */ #include <sys/param.h> #include <sys/systm.h> -#include <sys/namei.h> -#include <sys/proc.h> #include <sys/file.h> -#include <sys/stat.h> #include <sys/filedesc.h> /*#include <sys/ioctl.h>*/ +#include <sys/lock.h> #include <sys/mount.h> -#include <sys/vnode.h> +#include <sys/mutex.h> +#include <sys/namei.h> +#include <sys/proc.h> +#include <sys/stat.h> #include <sys/unistd.h> +#include <sys/vnode.h> #include <sys/sysproto.h> diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c index 8a35e84..1baed66 100644 --- a/sys/compat/svr4/svr4_misc.c +++ b/sys/compat/svr4/svr4_misc.c @@ -37,33 +37,33 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/namei.h> #include <sys/dirent.h> -#include <sys/malloc.h> -#include <sys/proc.h> -#include <sys/file.h> -#include <sys/stat.h> -#include <sys/time.h> -#include <sys/file.h> +#include <sys/fcntl.h> #include <sys/filedesc.h> #include <sys/jail.h> #include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/malloc.h> +#include <sys/file.h> /* Must come after sys/malloc.h */ #include <sys/mman.h> #include <sys/mount.h> +#include <sys/msg.h> +#include <sys/mutex.h> +#include <sys/namei.h> +#include <sys/proc.h> +#include <sys/ptrace.h> #include <sys/resource.h> #include <sys/resourcevar.h> +#include <sys/sem.h> +#include <sys/stat.h> #include <sys/sx.h> -#include <sys/vnode.h> +#include <sys/sysproto.h> +#include <sys/time.h> +#include <sys/times.h> #include <sys/uio.h> #include <sys/user.h> +#include <sys/vnode.h> #include <sys/wait.h> -#include <sys/times.h> -#include <sys/fcntl.h> -#include <sys/sem.h> -#include <sys/msg.h> -#include <sys/ptrace.h> - -#include <sys/sysproto.h> #include <compat/svr4/svr4.h> #include <compat/svr4/svr4_types.h> diff --git a/sys/compat/svr4/svr4_resource.c b/sys/compat/svr4/svr4_resource.c index 8737821..2b52140 100644 --- a/sys/compat/svr4/svr4_resource.c +++ b/sys/compat/svr4/svr4_resource.c @@ -74,8 +74,9 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/proc.h> #include <sys/file.h> +#include <sys/mutex.h> +#include <sys/proc.h> #include <sys/resource.h> #include <sys/resourcevar.h> diff --git a/sys/compat/svr4/svr4_signal.c b/sys/compat/svr4/svr4_signal.c index 87b9c78..8a855bf 100644 --- a/sys/compat/svr4/svr4_signal.c +++ b/sys/compat/svr4/svr4_signal.c @@ -30,8 +30,10 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/proc.h> #include <sys/filedesc.h> +#include <sys/lock.h> +#include <sys/mutex.h> +#include <sys/proc.h> #include <sys/signal.h> #include <sys/signalvar.h> #include <sys/sysproto.h> diff --git a/sys/compat/svr4/svr4_stream.c b/sys/compat/svr4/svr4_stream.c index 843a26b..ed7c8fa 100644 --- a/sys/compat/svr4/svr4_stream.c +++ b/sys/compat/svr4/svr4_stream.c @@ -41,25 +41,27 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/malloc.h> -#include <sys/file.h> -#include <sys/filedesc.h> #include <sys/fcntl.h> +#include <sys/filedesc.h> #include <sys/filio.h> -#include <sys/socket.h> -#include <sys/socketvar.h> -#include <sys/un.h> -#include <netinet/in.h> +#include <sys/lock.h> +#include <sys/malloc.h> +#include <sys/file.h> /* Must come after sys/malloc.h */ #include <sys/mbuf.h> +#include <sys/mutex.h> +#include <sys/proc.h> #include <sys/protosw.h> #include <sys/signal.h> #include <sys/signalvar.h> -#include <sys/uio.h> -#include <sys/ktrace.h> -#include <sys/proc.h> +#include <sys/socket.h> +#include <sys/socketvar.h> #include <sys/stat.h> - #include <sys/sysproto.h> +#include <sys/uio.h> +#include <sys/ktrace.h> /* Must come after sys/uio.h */ +#include <sys/un.h> + +#include <netinet/in.h> #include <compat/svr4/svr4.h> #include <compat/svr4/svr4_types.h> diff --git a/sys/ddb/db_watch.c b/sys/ddb/db_watch.c index 186a3cc..079013a 100644 --- a/sys/ddb/db_watch.c +++ b/sys/ddb/db_watch.c @@ -33,9 +33,10 @@ #include <sys/param.h> #include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/proc.h> #include <vm/vm.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 47ab349..93464e4 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -32,6 +32,7 @@ #include "opt_acpi.h" #include <sys/param.h> #include <sys/kernel.h> +#include <sys/proc.h> #include <sys/lock.h> #include <sys/malloc.h> #include <sys/mutex.h> diff --git a/sys/dev/bktr/bktr_core.c b/sys/dev/bktr/bktr_core.c index ecc0041..50e8511 100644 --- a/sys/dev/bktr/bktr_core.c +++ b/sys/dev/bktr/bktr_core.c @@ -116,6 +116,8 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/signalvar.h> #include <sys/vnode.h> diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c index b14b368..2906381 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.c @@ -69,17 +69,19 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/tty.h> +#include <sys/bus.h> #include <sys/conf.h> #include <sys/dkstat.h> #include <sys/fcntl.h> -#include <sys/bus.h> #include <sys/interrupt.h> #include <sys/ipl.h> #include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/mutex.h> #include <sys/syslog.h> +#include <sys/tty.h> + #include <machine/psl.h> #include <i386/isa/isa_device.h> diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c index b14b368..2906381 100644 --- a/sys/dev/cy/cy_isa.c +++ b/sys/dev/cy/cy_isa.c @@ -69,17 +69,19 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/tty.h> +#include <sys/bus.h> #include <sys/conf.h> #include <sys/dkstat.h> #include <sys/fcntl.h> -#include <sys/bus.h> #include <sys/interrupt.h> #include <sys/ipl.h> #include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/mutex.h> #include <sys/syslog.h> +#include <sys/tty.h> + #include <machine/psl.h> #include <i386/isa/isa_device.h> diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index 4b7789b..285aed8 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -56,15 +56,17 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/kernel.h> #include <sys/bio.h> #include <sys/bus.h> #include <sys/conf.h> -#include <sys/disklabel.h> #include <sys/devicestat.h> +#include <sys/disklabel.h> #include <sys/fcntl.h> +#include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/module.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/syslog.h> diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 8611872..a82a341 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -66,16 +66,18 @@ #include <sys/conf.h> #include <sys/devicestat.h> #include <sys/disk.h> +#include <sys/fcntl.h> #include <sys/kernel.h> -#include <sys/malloc.h> -#include <sys/sysctl.h> #include <sys/linker.h> -#include <sys/queue.h> +#include <sys/lock.h> +#include <sys/malloc.h> #include <sys/mdioctl.h> -#include <sys/vnode.h> #include <sys/namei.h> -#include <sys/fcntl.h> #include <sys/proc.h> +#include <sys/queue.h> +#include <sys/sysctl.h> +#include <sys/vnode.h> + #include <machine/atomic.h> #include <vm/vm.h> diff --git a/sys/dev/pdq/pdqvar.h b/sys/dev/pdq/pdqvar.h index 1819747..5828047 100644 --- a/sys/dev/pdq/pdqvar.h +++ b/sys/dev/pdq/pdqvar.h @@ -62,10 +62,13 @@ enum _pdq_type_t { #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> #ifndef M_MCAST #include <sys/mbuf.h> #endif /* M_CAST */ #include <sys/malloc.h> +#include <sys/mutex.h> + #include <vm/vm.h> #include <vm/vm_kern.h> diff --git a/sys/dev/random/randomdev.c b/sys/dev/random/randomdev.c index 252662d..a99fe6d 100644 --- a/sys/dev/random/randomdev.c +++ b/sys/dev/random/randomdev.c @@ -27,23 +27,25 @@ */ #include <sys/param.h> -#include <sys/queue.h> #include <sys/systm.h> +#include <sys/bus.h> #include <sys/conf.h> -#include <sys/filio.h> #include <sys/fcntl.h> -#include <sys/uio.h> +#include <sys/filio.h> #include <sys/kernel.h> #include <sys/kthread.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/module.h> -#include <sys/bus.h> +#include <sys/mutex.h> #include <sys/poll.h> -#include <sys/selinfo.h> +#include <sys/queue.h> #include <sys/random.h> +#include <sys/selinfo.h> #include <sys/sysctl.h> -#include <sys/vnode.h> +#include <sys/uio.h> #include <sys/unistd.h> +#include <sys/vnode.h> #include <machine/bus.h> #include <machine/cpu.h> diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index d1a876b..ab9cf09 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -52,22 +52,24 @@ * - Added PC-Card driver table and handlers */ #include <sys/param.h> -#include <sys/bus.h> #include <sys/systm.h> -#include <sys/reboot.h> -#include <sys/malloc.h> -#include <sys/tty.h> -#include <sys/proc.h> -#include <sys/module.h> +#include <sys/bus.h> +#include <sys/bus.h> #include <sys/conf.h> #include <sys/dkstat.h> #include <sys/fcntl.h> #include <sys/interrupt.h> #include <sys/ipl.h> #include <sys/kernel.h> -#include <sys/syslog.h> +#include <sys/lock.h> +#include <sys/malloc.h> +#include <sys/module.h> +#include <sys/mutex.h> +#include <sys/proc.h> +#include <sys/reboot.h> #include <sys/sysctl.h> -#include <sys/bus.h> +#include <sys/syslog.h> +#include <sys/tty.h> #include <machine/bus_pio.h> #include <machine/bus.h> #include <sys/rman.h> diff --git a/sys/dev/sound/midi/midi.h b/sys/dev/sound/midi/midi.h index f6e54b1..bcc7f89 100644 --- a/sys/dev/sound/midi/midi.h +++ b/sys/dev/sound/midi/midi.h @@ -40,6 +40,7 @@ #include <sys/ioccom.h> #include <sys/filio.h> +#include <sys/lock.h> #include <sys/sockio.h> #include <sys/fcntl.h> #include <sys/tty.h> diff --git a/sys/dev/syscons/scmouse.c b/sys/dev/syscons/scmouse.c index ccfc2f2..b4ad727 100644 --- a/sys/dev/syscons/scmouse.c +++ b/sys/dev/syscons/scmouse.c @@ -32,14 +32,16 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/conf.h> -#include <sys/signalvar.h> -#include <sys/proc.h> -#include <sys/random.h> -#include <sys/tty.h> -#include <sys/malloc.h> #include <sys/consio.h> #include <sys/fbio.h> +#include <sys/lock.h> +#include <sys/malloc.h> #include <sys/mouse.h> +#include <sys/mutex.h> +#include <sys/proc.h> +#include <sys/random.h> +#include <sys/signalvar.h> +#include <sys/tty.h> #include <dev/syscons/syscons.h> diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 2601c4e..da11de9 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -37,20 +37,22 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/eventhandler.h> -#include <sys/reboot.h> #include <sys/conf.h> +#include <sys/cons.h> +#include <sys/consio.h> +#include <sys/eventhandler.h> +#include <sys/fbio.h> +#include <sys/kbio.h> +#include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/malloc.h> +#include <sys/mutex.h> #include <sys/proc.h> +#include <sys/random.h> +#include <sys/reboot.h> #include <sys/signalvar.h> #include <sys/sysctl.h> #include <sys/tty.h> -#include <sys/kernel.h> -#include <sys/malloc.h> -#include <sys/cons.h> -#include <sys/random.h> -#include <sys/consio.h> -#include <sys/kbio.h> -#include <sys/fbio.h> #include <machine/clock.h> #include <machine/psl.h> diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index d34329e..869e94e 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -45,7 +45,9 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> +#include <sys/mutex.h> #include <sys/signalvar.h> #if defined(__NetBSD__) || defined(__OpenBSD__) #include <sys/device.h> diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c index 338871a..c99f8bf 100644 --- a/sys/dev/usb/usb.c +++ b/sys/dev/usb/usb.c @@ -47,7 +47,9 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> +#include <sys/mutex.h> #if defined(__NetBSD__) || defined(__OpenBSD__) #include <sys/device.h> #include <sys/kthread.h> diff --git a/sys/fs/coda/coda_fbsd.c b/sys/fs/coda/coda_fbsd.c index 8111691..c92b482 100644 --- a/sys/fs/coda/coda_fbsd.c +++ b/sys/fs/coda/coda_fbsd.c @@ -35,12 +35,13 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/conf.h> +#include <sys/fcntl.h> #include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> -#include <sys/fcntl.h> #include <sys/ucred.h> #include <sys/vnode.h> -#include <sys/conf.h> #include <vm/vm.h> #include <vm/vnode_pager.h> diff --git a/sys/fs/coda/coda_namecache.c b/sys/fs/coda/coda_namecache.c index 729c0ad..3b73a67 100644 --- a/sys/fs/coda/coda_namecache.c +++ b/sys/fs/coda/coda_namecache.c @@ -77,14 +77,12 @@ */ #include <sys/param.h> +#include <sys/systm.h> #include <sys/errno.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/ucred.h> -#ifndef insque -#include <sys/systm.h> -#endif /* insque */ - #include <vm/vm.h> #include <vm/vm_object.h> diff --git a/sys/fs/coda/coda_psdev.c b/sys/fs/coda/coda_psdev.c index e6ba198..0d8560f 100644 --- a/sys/fs/coda/coda_psdev.c +++ b/sys/fs/coda/coda_psdev.c @@ -58,15 +58,16 @@ extern int coda_nc_initialized; /* Set if cache has been initialized */ #include <sys/param.h> #include <sys/systm.h> +#include <sys/ioccom.h> #include <sys/kernel.h> -#include <sys/proc.h> +#include <sys/lock.h> #include <sys/malloc.h> -#include <net/radix.h> -#include <sys/socket.h> +#include <sys/file.h> /* must come after sys/malloc.h */ #include <sys/mount.h> -#include <sys/file.h> -#include <sys/ioccom.h> +#include <sys/mutex.h> #include <sys/poll.h> +#include <sys/proc.h> +#include <sys/socket.h> #include <coda/coda.h> #include <coda/cnode.h> diff --git a/sys/fs/coda/coda_subr.c b/sys/fs/coda/coda_subr.c index 8c4406b..84546c1 100644 --- a/sys/fs/coda/coda_subr.c +++ b/sys/fs/coda/coda_subr.c @@ -59,10 +59,10 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> #include <sys/malloc.h> -#include <net/radix.h> -#include <sys/socket.h> #include <sys/mount.h> +#include <sys/socket.h> #include <coda/coda.h> #include <coda/cnode.h> diff --git a/sys/fs/coda/coda_venus.c b/sys/fs/coda/coda_venus.c index 1784e2f..022009e 100644 --- a/sys/fs/coda/coda_venus.c +++ b/sys/fs/coda/coda_venus.c @@ -33,10 +33,12 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/fcntl.h> +#include <sys/ioccom.h> +#include <sys/lock.h> #include <sys/malloc.h> +#include <sys/mutex.h> #include <sys/proc.h> -#include <sys/ioccom.h> -#include <sys/fcntl.h> #include <coda/coda.h> #include <coda/cnode.h> diff --git a/sys/fs/coda/coda_vfsops.c b/sys/fs/coda/coda_vfsops.c index 437e9fd..a640cf4 100644 --- a/sys/fs/coda/coda_vfsops.c +++ b/sys/fs/coda/coda_vfsops.c @@ -48,14 +48,14 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/conf.h> #include <sys/kernel.h> -#include <sys/proc.h> +#include <sys/lock.h> #include <sys/malloc.h> -#include <sys/conf.h> +#include <sys/mount.h> #include <sys/namei.h> -#include <net/radix.h> +#include <sys/proc.h> #include <sys/socket.h> -#include <sys/mount.h> #include <coda/coda.h> #include <coda/cnode.h> diff --git a/sys/fs/coda/coda_vnops.c b/sys/fs/coda/coda_vnops.c index 2619917..1444fb2 100644 --- a/sys/fs/coda/coda_vnops.c +++ b/sys/fs/coda/coda_vnops.c @@ -47,18 +47,19 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/acct.h> +#include <sys/errno.h> +#include <sys/fcntl.h> #include <sys/kernel.h> -#include <sys/proc.h> +#include <sys/lock.h> #include <sys/malloc.h> -#include <net/radix.h> -#include <sys/socket.h> +#include <sys/file.h> /* Must come after sys/malloc.h */ #include <sys/mount.h> -#include <sys/errno.h> -#include <sys/acct.h> -#include <sys/file.h> -#include <sys/fcntl.h> -#include <sys/uio.h> +#include <sys/mutex.h> #include <sys/namei.h> +#include <sys/proc.h> +#include <sys/socket.h> +#include <sys/uio.h> #include <vm/vm.h> #include <vm/vm_object.h> diff --git a/sys/fs/deadfs/dead_vnops.c b/sys/fs/deadfs/dead_vnops.c index 8de5c57..9911453 100644 --- a/sys/fs/deadfs/dead_vnops.c +++ b/sys/fs/deadfs/dead_vnops.c @@ -38,10 +38,9 @@ #include <sys/systm.h> #include <sys/kernel.h> #include <sys/lock.h> -#include <sys/vnode.h> +#include <sys/mutex.h> #include <sys/poll.h> - -#include <machine/mutex.h> +#include <sys/vnode.h> static int chkvnlock __P((struct vnode *)); /* diff --git a/sys/fs/devfs/devfs_devs.c b/sys/fs/devfs/devfs_devs.c index c7814a2..4dfd0e5 100644 --- a/sys/fs/devfs/devfs_devs.c +++ b/sys/fs/devfs/devfs_devs.c @@ -33,13 +33,14 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/dirent.h> #include <sys/conf.h> -#include <sys/vnode.h> -#include <sys/malloc.h> -#include <sys/sysctl.h> +#include <sys/dirent.h> #include <sys/kernel.h> #include <sys/lock.h> +#include <sys/malloc.h> +#include <sys/proc.h> +#include <sys/sysctl.h> +#include <sys/vnode.h> #include <machine/atomic.h> diff --git a/sys/fs/devfs/devfs_vfsops.c b/sys/fs/devfs/devfs_vfsops.c index f5609b9..69ec9b2 100644 --- a/sys/fs/devfs/devfs_vfsops.c +++ b/sys/fs/devfs/devfs_vfsops.c @@ -39,11 +39,12 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> -#include <sys/vnode.h> -#include <net/radix.h> -#include <sys/socket.h> -#include <sys/mount.h> +#include <sys/lock.h> #include <sys/malloc.h> +#include <sys/mount.h> +#include <sys/proc.h> +#include <sys/socket.h> +#include <sys/vnode.h> #include <fs/devfs/devfs.h> diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index 41cdc18..b0f2886 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -37,16 +37,17 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/kernel.h> -#include <sys/time.h> #include <sys/conf.h> -#include <sys/vnode.h> +#include <sys/dirent.h> +#include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> -#include <net/radix.h> -#include <sys/socket.h> #include <sys/mount.h> #include <sys/namei.h> -#include <sys/dirent.h> +#include <sys/proc.h> +#include <sys/socket.h> +#include <sys/time.h> +#include <sys/vnode.h> #include <fs/devfs/devfs.h> diff --git a/sys/fs/fdescfs/fdesc_vfsops.c b/sys/fs/fdescfs/fdesc_vfsops.c index e93ad50..900e1de 100644 --- a/sys/fs/fdescfs/fdesc_vfsops.c +++ b/sys/fs/fdescfs/fdesc_vfsops.c @@ -44,15 +44,16 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/filedesc.h> #include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/malloc.h> +#include <sys/mount.h> #include <sys/proc.h> #include <sys/resourcevar.h> -#include <sys/filedesc.h> -#include <sys/vnode.h> -#include <net/radix.h> #include <sys/socket.h> -#include <sys/mount.h> -#include <sys/malloc.h> +#include <sys/vnode.h> + #include <miscfs/fdesc/fdesc.h> static MALLOC_DEFINE(M_FDESCMNT, "FDESC mount", "FDESC mount structure"); diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index 5846ac7..065e0a8 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -44,19 +44,20 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/proc.h> -#include <sys/kernel.h> /* boottime */ +#include <sys/conf.h> +#include <sys/dirent.h> #include <sys/filedesc.h> -#include <sys/vnode.h> +#include <sys/kernel.h> /* boottime */ +#include <sys/lock.h> #include <sys/malloc.h> -#include <sys/file.h> -#include <sys/stat.h> -#include <net/radix.h> -#include <sys/socket.h> +#include <sys/file.h> /* Must come after sys/malloc.h */ #include <sys/mount.h> #include <sys/namei.h> -#include <sys/dirent.h> -#include <sys/conf.h> +#include <sys/proc.h> +#include <sys/socket.h> +#include <sys/stat.h> +#include <sys/vnode.h> + #include <miscfs/fdesc/fdesc.h> #define FDL_WANT 0x01 diff --git a/sys/fs/nullfs/null_subr.c b/sys/fs/nullfs/null_subr.c index fe5f988..88f1584 100644 --- a/sys/fs/nullfs/null_subr.c +++ b/sys/fs/nullfs/null_subr.c @@ -41,9 +41,12 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> -#include <sys/vnode.h> -#include <sys/mount.h> +#include <sys/lock.h> #include <sys/malloc.h> +#include <sys/mount.h> +#include <sys/proc.h> +#include <sys/vnode.h> + #include <miscfs/nullfs/null.h> #define LOG2_SIZEVNODE 7 /* log2(sizeof struct vnode) */ diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index c9a6801..dfaefe3 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -47,10 +47,13 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> -#include <sys/vnode.h> #include <sys/mount.h> #include <sys/namei.h> +#include <sys/proc.h> +#include <sys/vnode.h> + #include <miscfs/nullfs/null.h> static MALLOC_DEFINE(M_NULLFSMNT, "NULLFS mount", "NULLFS mount structure"); diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c index e9fded7..d37ef73 100644 --- a/sys/fs/nullfs/null_vnops.c +++ b/sys/fs/nullfs/null_vnops.c @@ -175,13 +175,16 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/kernel.h> #include <sys/conf.h> -#include <sys/sysctl.h> -#include <sys/vnode.h> +#include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/malloc.h> #include <sys/mount.h> +#include <sys/mutex.h> #include <sys/namei.h> -#include <sys/malloc.h> +#include <sys/sysctl.h> +#include <sys/vnode.h> + #include <miscfs/nullfs/null.h> #include <vm/vm.h> diff --git a/sys/fs/nwfs/nwfs_node.c b/sys/fs/nwfs/nwfs_node.c index 3ba41a8..9c1f086 100644 --- a/sys/fs/nwfs/nwfs_node.c +++ b/sys/fs/nwfs/nwfs_node.c @@ -34,17 +34,20 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> -#include <sys/time.h> -#include <sys/proc.h> -#include <sys/mount.h> -#include <sys/vnode.h> +#include <sys/lock.h> #include <sys/malloc.h> +#include <sys/mount.h> +#include <sys/mutex.h> +#include <sys/proc.h> +#include <sys/queue.h> #include <sys/sysctl.h> +#include <sys/time.h> +#include <sys/vnode.h> + #include <vm/vm.h> #include <vm/vm_extern.h> #include <vm/vm_page.h> #include <vm/vm_object.h> -#include <sys/queue.h> #include <netncp/ncp.h> #include <netncp/ncp_conn.h> diff --git a/sys/fs/portalfs/portal_vfsops.c b/sys/fs/portalfs/portal_vfsops.c index 3f7903c..5146456 100644 --- a/sys/fs/portalfs/portal_vfsops.c +++ b/sys/fs/portalfs/portal_vfsops.c @@ -44,17 +44,19 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/kernel.h> -#include <sys/proc.h> +#include <sys/domain.h> #include <sys/filedesc.h> -#include <sys/file.h> -#include <sys/vnode.h> -#include <sys/mount.h> +#include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> +#include <sys/file.h> /* Must come after sys/malloc.h */ +#include <sys/mount.h> +#include <sys/proc.h> +#include <sys/protosw.h> #include <sys/socket.h> #include <sys/socketvar.h> -#include <sys/protosw.h> -#include <sys/domain.h> +#include <sys/vnode.h> + #include <miscfs/portal/portal.h> static MALLOC_DEFINE(M_PORTALFSMNT, "PORTAL mount", "PORTAL mount structure"); diff --git a/sys/fs/procfs/procfs_ctl.c b/sys/fs/procfs/procfs_ctl.c index f0a5427..5818758 100644 --- a/sys/fs/procfs/procfs_ctl.c +++ b/sys/fs/procfs/procfs_ctl.c @@ -40,11 +40,14 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> -#include <sys/vnode.h> #include <sys/ptrace.h> #include <sys/signalvar.h> #include <sys/sx.h> +#include <sys/vnode.h> + #include <miscfs/procfs/procfs.h> #include <vm/vm.h> diff --git a/sys/fs/procfs/procfs_dbregs.c b/sys/fs/procfs/procfs_dbregs.c index 9487569..d80e28c 100644 --- a/sys/fs/procfs/procfs_dbregs.c +++ b/sys/fs/procfs/procfs_dbregs.c @@ -44,11 +44,16 @@ */ #include <sys/param.h> +#include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/vnode.h> -#include <sys/systm.h> + #include <machine/reg.h> + #include <miscfs/procfs/procfs.h> + #include <vm/vm.h> int diff --git a/sys/fs/procfs/procfs_fpregs.c b/sys/fs/procfs/procfs_fpregs.c index 6249f52..7e2ff52 100644 --- a/sys/fs/procfs/procfs_fpregs.c +++ b/sys/fs/procfs/procfs_fpregs.c @@ -41,11 +41,16 @@ */ #include <sys/param.h> +#include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/vnode.h> -#include <sys/systm.h> + #include <machine/reg.h> + #include <miscfs/procfs/procfs.h> + #include <vm/vm.h> int diff --git a/sys/fs/procfs/procfs_map.c b/sys/fs/procfs/procfs_map.c index 1caa630..5e4a30c 100644 --- a/sys/fs/procfs/procfs_map.c +++ b/sys/fs/procfs/procfs_map.c @@ -41,12 +41,13 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> #include <sys/proc.h> #include <sys/vnode.h> + #include <miscfs/procfs/procfs.h> #include <vm/vm.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> #include <vm/vm_page.h> diff --git a/sys/fs/procfs/procfs_mem.c b/sys/fs/procfs/procfs_mem.c index 6f2c8cb..3a2f8d2 100644 --- a/sys/fs/procfs/procfs_mem.c +++ b/sys/fs/procfs/procfs_mem.c @@ -47,20 +47,22 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> #include <sys/proc.h> +#include <sys/ptrace.h> +#include <sys/user.h> #include <sys/vnode.h> + #include <miscfs/procfs/procfs.h> + #include <vm/vm.h> #include <vm/vm_param.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_extern.h> #include <vm/vm_map.h> #include <vm/vm_kern.h> #include <vm/vm_object.h> #include <vm/vm_page.h> -#include <sys/user.h> -#include <sys/ptrace.h> static int procfs_rwmem __P((struct proc *curp, struct proc *p, struct uio *uio)); diff --git a/sys/fs/procfs/procfs_regs.c b/sys/fs/procfs/procfs_regs.c index 12efe85..ba58517 100644 --- a/sys/fs/procfs/procfs_regs.c +++ b/sys/fs/procfs/procfs_regs.c @@ -41,14 +41,19 @@ */ #include <sys/param.h> +#include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/vnode.h> -#include <sys/systm.h> + #include <machine/reg.h> -#include <miscfs/procfs/procfs.h> + #include <vm/vm.h> #include <vm/vm_extern.h> +#include <miscfs/procfs/procfs.h> + int procfs_doregs(curp, p, pfs, uio) struct proc *curp; diff --git a/sys/fs/procfs/procfs_status.c b/sys/fs/procfs/procfs_status.c index 40e3fbe..b29b4a9 100644 --- a/sys/fs/procfs/procfs_status.c +++ b/sys/fs/procfs/procfs_status.c @@ -42,18 +42,21 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/exec.h> +#include <sys/jail.h> +#include <sys/lock.h> #include <sys/malloc.h> +#include <sys/mutex.h> #include <sys/proc.h> -#include <sys/jail.h> -#include <sys/vnode.h> -#include <sys/tty.h> #include <sys/resourcevar.h> -#include <miscfs/procfs/procfs.h> +#include <sys/tty.h> +#include <sys/vnode.h> #include <vm/vm.h> #include <vm/pmap.h> #include <vm/vm_param.h> -#include <sys/exec.h> + +#include <miscfs/procfs/procfs.h> #define DOCHECK() do { if (ps >= psbuf+sizeof(psbuf)) goto bailout; } while (0) int diff --git a/sys/fs/procfs/procfs_subr.c b/sys/fs/procfs/procfs_subr.c index b960b13..64adecb 100644 --- a/sys/fs/procfs/procfs_subr.c +++ b/sys/fs/procfs/procfs_subr.c @@ -41,13 +41,14 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/sysctl.h> +#include <sys/lock.h> +#include <sys/malloc.h> +#include <sys/mount.h> +#include <sys/mutex.h> #include <sys/proc.h> -#include <net/radix.h> #include <sys/socket.h> -#include <sys/mount.h> +#include <sys/sysctl.h> #include <sys/vnode.h> -#include <sys/malloc.h> #include <miscfs/procfs/procfs.h> diff --git a/sys/fs/procfs/procfs_vnops.c b/sys/fs/procfs/procfs_vnops.c index f7201fb..2e7b7cb 100644 --- a/sys/fs/procfs/procfs_vnops.c +++ b/sys/fs/procfs/procfs_vnops.c @@ -45,23 +45,28 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/time.h> +#include <sys/dirent.h> +#include <sys/fcntl.h> #include <sys/kernel.h> #include <sys/lock.h> -#include <sys/fcntl.h> +#include <sys/malloc.h> +#include <sys/mount.h> +#include <sys/mutex.h> +#include <sys/namei.h> +#include <sys/pioctl.h> #include <sys/proc.h> #include <sys/signalvar.h> +#include <sys/socket.h> #include <sys/sx.h> -#include <sys/vnode.h> +#include <sys/time.h> #include <sys/uio.h> -#include <sys/mount.h> -#include <sys/namei.h> -#include <sys/dirent.h> -#include <sys/malloc.h> +#include <sys/vnode.h> + #include <machine/reg.h> + #include <vm/vm_zone.h> + #include <miscfs/procfs/procfs.h> -#include <sys/pioctl.h> static int procfs_access __P((struct vop_access_args *)); static int procfs_badop __P((void)); diff --git a/sys/fs/smbfs/smbfs_node.c b/sys/fs/smbfs/smbfs_node.c index 0d98605..35be6a3 100644 --- a/sys/fs/smbfs/smbfs_node.c +++ b/sys/fs/smbfs/smbfs_node.c @@ -34,22 +34,24 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> -#include <sys/time.h> -#include <sys/proc.h> -#include <sys/mount.h> -#include <sys/vnode.h> +#include <sys/lock.h> #include <sys/malloc.h> -#include <sys/sysctl.h> -#include <vm/vm.h> -#include <vm/vm_extern.h> -/*#include <vm/vm_page.h> -#include <vm/vm_object.h>*/ +#include <sys/mount.h> +#include <sys/proc.h> #include <sys/queue.h> +#include <sys/sysctl.h> +#include <sys/time.h> +#include <sys/vnode.h> #include <netsmb/smb.h> #include <netsmb/smb_conn.h> #include <netsmb/smb_subr.h> +#include <vm/vm.h> +#include <vm/vm_extern.h> +/*#include <vm/vm_page.h> +#include <vm/vm_object.h>*/ + #include <fs/smbfs/smbfs.h> #include <fs/smbfs/smbfs_node.h> #include <fs/smbfs/smbfs_subr.h> diff --git a/sys/fs/umapfs/umap_subr.c b/sys/fs/umapfs/umap_subr.c index 9b9806e..1f94d50 100644 --- a/sys/fs/umapfs/umap_subr.c +++ b/sys/fs/umapfs/umap_subr.c @@ -40,9 +40,11 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/vnode.h> -#include <sys/mount.h> #include <sys/malloc.h> +#include <sys/mount.h> +#include <sys/proc.h> +#include <sys/vnode.h> + #include <miscfs/umapfs/umap.h> #define LOG2_SIZEVNODE 7 /* log2(sizeof struct vnode) */ diff --git a/sys/fs/umapfs/umap_vfsops.c b/sys/fs/umapfs/umap_vfsops.c index abd1b07..e86467d 100644 --- a/sys/fs/umapfs/umap_vfsops.c +++ b/sys/fs/umapfs/umap_vfsops.c @@ -46,10 +46,13 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> -#include <sys/vnode.h> +#include <sys/lock.h> +#include <sys/malloc.h> #include <sys/mount.h> +#include <sys/mutex.h> #include <sys/namei.h> -#include <sys/malloc.h> +#include <sys/vnode.h> + #include <miscfs/umapfs/umap.h> static MALLOC_DEFINE(M_UMAPFSMNT, "UMAP mount", "UMAP mount structure"); diff --git a/sys/fs/umapfs/umap_vnops.c b/sys/fs/umapfs/umap_vnops.c index 669a9ae..5bf29c8 100644 --- a/sys/fs/umapfs/umap_vnops.c +++ b/sys/fs/umapfs/umap_vnops.c @@ -44,11 +44,13 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> -#include <sys/sysctl.h> -#include <sys/vnode.h> +#include <sys/lock.h> +#include <sys/malloc.h> #include <sys/mount.h> #include <sys/namei.h> -#include <sys/malloc.h> +#include <sys/sysctl.h> +#include <sys/vnode.h> + #include <miscfs/umapfs/umap.h> #include <miscfs/nullfs/null.h> diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index 71eae9c..b4f2802 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -40,20 +40,23 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/kernel.h> -#include <sys/vnode.h> -#include <sys/namei.h> -#include <sys/malloc.h> #include <sys/fcntl.h> #include <sys/file.h> #include <sys/filedesc.h> +#include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/malloc.h> #include <sys/module.h> #include <sys/mount.h> +#include <sys/namei.h> #include <sys/stat.h> +#include <sys/vnode.h> + #include <vm/vm.h> #include <vm/vm_extern.h> /* for vnode_pager_setsize */ #include <vm/vm_zone.h> #include <vm/vm_object.h> /* for vm cache coherency */ + #include <miscfs/union/union.h> #include <sys/proc.h> diff --git a/sys/gnu/ext2fs/ext2_subr.c b/sys/gnu/ext2fs/ext2_subr.c index ee1f621..fe7c662 100644 --- a/sys/gnu/ext2fs/ext2_subr.c +++ b/sys/gnu/ext2fs/ext2_subr.c @@ -41,19 +41,22 @@ */ #include <sys/param.h> -#include <gnu/ext2fs/ext2_fs_sb.h> -#include <gnu/ext2fs/fs.h> -#include <sys/lock.h> +#include <sys/proc.h> #include <sys/systm.h> -#include <sys/ucred.h> -#include <sys/vnode.h> -#include <gnu/ext2fs/ext2_extern.h> #include <sys/bio.h> #include <sys/buf.h> +#include <sys/lock.h> +#include <sys/ucred.h> +#include <sys/vnode.h> + #include <ufs/ufs/quota.h> #include <ufs/ufs/inode.h> +#include <gnu/ext2fs/ext2_extern.h> +#include <gnu/ext2fs/ext2_fs_sb.h> +#include <gnu/ext2fs/fs.h> + #include "opt_ddb.h" #ifdef DDB diff --git a/sys/gnu/fs/ext2fs/ext2_subr.c b/sys/gnu/fs/ext2fs/ext2_subr.c index ee1f621..fe7c662 100644 --- a/sys/gnu/fs/ext2fs/ext2_subr.c +++ b/sys/gnu/fs/ext2fs/ext2_subr.c @@ -41,19 +41,22 @@ */ #include <sys/param.h> -#include <gnu/ext2fs/ext2_fs_sb.h> -#include <gnu/ext2fs/fs.h> -#include <sys/lock.h> +#include <sys/proc.h> #include <sys/systm.h> -#include <sys/ucred.h> -#include <sys/vnode.h> -#include <gnu/ext2fs/ext2_extern.h> #include <sys/bio.h> #include <sys/buf.h> +#include <sys/lock.h> +#include <sys/ucred.h> +#include <sys/vnode.h> + #include <ufs/ufs/quota.h> #include <ufs/ufs/inode.h> +#include <gnu/ext2fs/ext2_extern.h> +#include <gnu/ext2fs/ext2_fs_sb.h> +#include <gnu/ext2fs/fs.h> + #include "opt_ddb.h" #ifdef DDB diff --git a/sys/gnu/i386/fpemul/fpu_entry.c b/sys/gnu/i386/fpemul/fpu_entry.c index 3d03783..77cee77 100644 --- a/sys/gnu/i386/fpemul/fpu_entry.c +++ b/sys/gnu/i386/fpemul/fpu_entry.c @@ -73,8 +73,10 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/proc.h> #include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/mutex.h> +#include <sys/proc.h> #include <machine/cpu.h> #include <machine/pcb.h> diff --git a/sys/i386/i386/math_emulate.c b/sys/i386/i386/math_emulate.c index ec7e216..eae1fcc 100644 --- a/sys/i386/i386/math_emulate.c +++ b/sys/i386/i386/math_emulate.c @@ -37,18 +37,17 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/proc.h> +#include <sys/user.h> #include <machine/frame.h> #include <machine/reg.h> -#include <sys/proc.h> -#include <sys/kernel.h> - #include <vm/vm.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> -#include <sys/user.h> #define __ALIGNED_TEMP_REAL 1 #include <i386/i386/math_emu.h> diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c index 21e6b6e..ff602c4 100644 --- a/sys/i386/i386/mp_machdep.c +++ b/sys/i386/i386/mp_machdep.c @@ -34,29 +34,29 @@ #endif #include <sys/param.h> -#include <sys/bus.h> #include <sys/systm.h> +#include <sys/bus.h> +#include <sys/cons.h> /* cngetc() */ +#include <sys/dkstat.h> +#ifdef GPROF +#include <sys/gmon.h> +#endif #include <sys/kernel.h> -#include <sys/proc.h> -#include <sys/sysctl.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/memrange.h> #include <sys/mutex.h> +#include <sys/proc.h> #include <sys/smp.h> -#include <sys/dkstat.h> -#include <sys/cons.h> /* cngetc() */ +#include <sys/sysctl.h> +#include <sys/user.h> #include <vm/vm.h> #include <vm/vm_param.h> #include <vm/pmap.h> #include <vm/vm_kern.h> #include <vm/vm_extern.h> -#include <sys/lock.h> #include <vm/vm_map.h> -#include <sys/user.h> -#ifdef GPROF -#include <sys/gmon.h> -#endif #include <machine/apic.h> #include <machine/atomic.h> diff --git a/sys/i386/i386/mpapic.c b/sys/i386/i386/mpapic.c index e40f216..eadd5d7 100644 --- a/sys/i386/i386/mpapic.c +++ b/sys/i386/i386/mpapic.c @@ -26,10 +26,11 @@ */ #include <sys/param.h> -#include <sys/bus.h> #include <sys/systm.h> -#include <sys/proc.h> +#include <sys/bus.h> #include <sys/lock.h> +#include <sys/mutex.h> +#include <sys/proc.h> #include <machine/smptests.h> /** TEST_TEST1 */ #include <machine/smp.h> diff --git a/sys/i386/i386/mptable.c b/sys/i386/i386/mptable.c index 21e6b6e..ff602c4 100644 --- a/sys/i386/i386/mptable.c +++ b/sys/i386/i386/mptable.c @@ -34,29 +34,29 @@ #endif #include <sys/param.h> -#include <sys/bus.h> #include <sys/systm.h> +#include <sys/bus.h> +#include <sys/cons.h> /* cngetc() */ +#include <sys/dkstat.h> +#ifdef GPROF +#include <sys/gmon.h> +#endif #include <sys/kernel.h> -#include <sys/proc.h> -#include <sys/sysctl.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/memrange.h> #include <sys/mutex.h> +#include <sys/proc.h> #include <sys/smp.h> -#include <sys/dkstat.h> -#include <sys/cons.h> /* cngetc() */ +#include <sys/sysctl.h> +#include <sys/user.h> #include <vm/vm.h> #include <vm/vm_param.h> #include <vm/pmap.h> #include <vm/vm_kern.h> #include <vm/vm_extern.h> -#include <sys/lock.h> #include <vm/vm_map.h> -#include <sys/user.h> -#ifdef GPROF -#include <sys/gmon.h> -#endif #include <machine/apic.h> #include <machine/atomic.h> diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 5c5b0bb..93807ee 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -74,15 +74,16 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/proc.h> -#include <sys/msgbuf.h> -#include <sys/vmmeter.h> +#include <sys/lock.h> #include <sys/mman.h> +#include <sys/msgbuf.h> +#include <sys/proc.h> #include <sys/sx.h> +#include <sys/user.h> +#include <sys/vmmeter.h> #include <vm/vm.h> #include <vm/vm_param.h> -#include <sys/lock.h> #include <vm/vm_kern.h> #include <vm/vm_page.h> #include <vm/vm_map.h> @@ -92,8 +93,6 @@ #include <vm/vm_pager.h> #include <vm/vm_zone.h> -#include <sys/user.h> - #include <machine/cputypes.h> #include <machine/md_var.h> #include <machine/specialreg.h> diff --git a/sys/i386/i386/procfs_machdep.c b/sys/i386/i386/procfs_machdep.c index 292214f..ae285c9a 100644 --- a/sys/i386/i386/procfs_machdep.c +++ b/sys/i386/i386/procfs_machdep.c @@ -68,16 +68,18 @@ */ #include <sys/param.h> +#include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/ptrace.h> #include <sys/vnode.h> -#include <sys/systm.h> + #include <machine/reg.h> #include <machine/md_var.h> #include <miscfs/procfs/procfs.h> #include <vm/vm.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> diff --git a/sys/i386/i386/sys_machdep.c b/sys/i386/i386/sys_machdep.c index 5ed16ab..ea56e1d 100644 --- a/sys/i386/i386/sys_machdep.c +++ b/sys/i386/i386/sys_machdep.c @@ -37,20 +37,20 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/sysproto.h> #include <sys/ipl.h> +#include <sys/lock.h> #include <sys/malloc.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/smp.h> +#include <sys/sysproto.h> +#include <sys/user.h> #include <vm/vm.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> #include <vm/vm_extern.h> -#include <sys/user.h> - #include <machine/cpu.h> #include <machine/pcb_ext.h> /* pcb.h included by sys/user.h */ #include <machine/sysarch.h> diff --git a/sys/i386/ibcs2/ibcs2_fcntl.c b/sys/i386/ibcs2/ibcs2_fcntl.c index 61c37cc..971adce 100644 --- a/sys/i386/ibcs2/ibcs2_fcntl.c +++ b/sys/i386/ibcs2/ibcs2_fcntl.c @@ -34,8 +34,10 @@ #include <sys/fcntl.h> #include <sys/file.h> #include <sys/filedesc.h> -#include <sys/ttycom.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/sysproto.h> +#include <sys/ttycom.h> #include <i386/ibcs2/ibcs2_fcntl.h> #include <i386/ibcs2/ibcs2_signal.h> diff --git a/sys/i386/ibcs2/ibcs2_ioctl.c b/sys/i386/ibcs2/ibcs2_ioctl.c index 1350c1a..42190d2 100644 --- a/sys/i386/ibcs2/ibcs2_ioctl.c +++ b/sys/i386/ibcs2/ibcs2_ioctl.c @@ -30,16 +30,17 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/consio.h> #include <sys/fcntl.h> #include <sys/file.h> #include <sys/filedesc.h> #include <sys/filio.h> #include <sys/ioctl_compat.h> -#include <sys/tty.h> #include <sys/kbio.h> -#include <sys/consio.h> - +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/sysproto.h> +#include <sys/tty.h> #include <i386/ibcs2/ibcs2_signal.h> #include <i386/ibcs2/ibcs2_socksys.h> diff --git a/sys/i386/ibcs2/ibcs2_misc.c b/sys/i386/ibcs2/ibcs2_misc.c index b53788f..6f8d7e7 100644 --- a/sys/i386/ibcs2/ibcs2_misc.c +++ b/sys/i386/ibcs2/ibcs2_misc.c @@ -55,19 +55,20 @@ * handled here. */ #include <sys/param.h> +#include <sys/systm.h> #include <sys/dirent.h> #include <sys/fcntl.h> -#include <sys/file.h> #include <sys/filedesc.h> #include <sys/kernel.h> #include <sys/lock.h> #include <sys/malloc.h> +#include <sys/file.h> /* Must come after sys/malloc.h */ +#include <sys/mutex.h> #include <sys/reboot.h> #include <sys/resourcevar.h> #include <sys/stat.h> #include <sys/sysctl.h> #include <sys/sysproto.h> -#include <sys/systm.h> #include <sys/time.h> #include <sys/times.h> #include <sys/vnode.h> diff --git a/sys/i386/ibcs2/ibcs2_other.c b/sys/i386/ibcs2/ibcs2_other.c index 23b9743..4f90159 100644 --- a/sys/i386/ibcs2/ibcs2_other.c +++ b/sys/i386/ibcs2/ibcs2_other.c @@ -32,6 +32,8 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/sysproto.h> #include <i386/ibcs2/ibcs2_types.h> diff --git a/sys/i386/ibcs2/ibcs2_signal.c b/sys/i386/ibcs2/ibcs2_signal.c index 70b5f57..6049142 100644 --- a/sys/i386/ibcs2/ibcs2_signal.c +++ b/sys/i386/ibcs2/ibcs2_signal.c @@ -30,6 +30,8 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/signalvar.h> #include <sys/sysproto.h> diff --git a/sys/i386/ibcs2/imgact_coff.c b/sys/i386/ibcs2/imgact_coff.c index e7cb544..a2f624d 100644 --- a/sys/i386/ibcs2/imgact_coff.c +++ b/sys/i386/ibcs2/imgact_coff.c @@ -31,11 +31,12 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/mman.h> +#include <sys/fcntl.h> #include <sys/imgact.h> #include <sys/kernel.h> -#include <sys/fcntl.h> +#include <sys/lock.h> #include <sys/malloc.h> +#include <sys/mman.h> #include <sys/mount.h> #include <sys/namei.h> #include <sys/vnode.h> diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h index 21e6b6e..ff602c4 100644 --- a/sys/i386/include/mptable.h +++ b/sys/i386/include/mptable.h @@ -34,29 +34,29 @@ #endif #include <sys/param.h> -#include <sys/bus.h> #include <sys/systm.h> +#include <sys/bus.h> +#include <sys/cons.h> /* cngetc() */ +#include <sys/dkstat.h> +#ifdef GPROF +#include <sys/gmon.h> +#endif #include <sys/kernel.h> -#include <sys/proc.h> -#include <sys/sysctl.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/memrange.h> #include <sys/mutex.h> +#include <sys/proc.h> #include <sys/smp.h> -#include <sys/dkstat.h> -#include <sys/cons.h> /* cngetc() */ +#include <sys/sysctl.h> +#include <sys/user.h> #include <vm/vm.h> #include <vm/vm_param.h> #include <vm/pmap.h> #include <vm/vm_kern.h> #include <vm/vm_extern.h> -#include <sys/lock.h> #include <vm/vm_map.h> -#include <sys/user.h> -#ifdef GPROF -#include <sys/gmon.h> -#endif #include <machine/apic.h> #include <machine/atomic.h> diff --git a/sys/i386/isa/cy.c b/sys/i386/isa/cy.c index b14b368..2906381 100644 --- a/sys/i386/isa/cy.c +++ b/sys/i386/isa/cy.c @@ -69,17 +69,19 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/tty.h> +#include <sys/bus.h> #include <sys/conf.h> #include <sys/dkstat.h> #include <sys/fcntl.h> -#include <sys/bus.h> #include <sys/interrupt.h> #include <sys/ipl.h> #include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/mutex.h> #include <sys/syslog.h> +#include <sys/tty.h> + #include <machine/psl.h> #include <i386/isa/isa_device.h> diff --git a/sys/i386/isa/intr_machdep.c b/sys/i386/isa/intr_machdep.c index 99f9761..2e9eabc3 100644 --- a/sys/i386/isa/intr_machdep.c +++ b/sys/i386/isa/intr_machdep.c @@ -42,23 +42,24 @@ #include "opt_mca.h" #include <sys/param.h> -#include <sys/bus.h> -#include <sys/proc.h> -#include <sys/systm.h> -#include <sys/syslog.h> +#include <sys/bus.h> +#include <sys/errno.h> +#include <sys/interrupt.h> #include <sys/ipl.h> #include <sys/kernel.h> #include <sys/kthread.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/module.h> #include <sys/mutex.h> +#include <sys/proc.h> +#include <sys/syslog.h> +#include <sys/systm.h> #include <sys/unistd.h> -#include <sys/errno.h> -#include <sys/interrupt.h> + #include <machine/md_var.h> #include <machine/segments.h> #include <machine/intrcnt.h> -#include <sys/bus.h> #if defined(APIC_IO) #include <machine/smptests.h> /** FAST_HI */ diff --git a/sys/i386/isa/nmi.c b/sys/i386/isa/nmi.c index 99f9761..2e9eabc3 100644 --- a/sys/i386/isa/nmi.c +++ b/sys/i386/isa/nmi.c @@ -42,23 +42,24 @@ #include "opt_mca.h" #include <sys/param.h> -#include <sys/bus.h> -#include <sys/proc.h> -#include <sys/systm.h> -#include <sys/syslog.h> +#include <sys/bus.h> +#include <sys/errno.h> +#include <sys/interrupt.h> #include <sys/ipl.h> #include <sys/kernel.h> #include <sys/kthread.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/module.h> #include <sys/mutex.h> +#include <sys/proc.h> +#include <sys/syslog.h> +#include <sys/systm.h> #include <sys/unistd.h> -#include <sys/errno.h> -#include <sys/interrupt.h> + #include <machine/md_var.h> #include <machine/segments.h> #include <machine/intrcnt.h> -#include <sys/bus.h> #if defined(APIC_IO) #include <machine/smptests.h> /** FAST_HI */ diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c index 6ec2738..91dbcad 100644 --- a/sys/i386/isa/npx.c +++ b/sys/i386/isa/npx.c @@ -43,11 +43,13 @@ #include <sys/bus.h> #include <sys/ipl.h> #include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/module.h> -#include <sys/sysctl.h> -#include <sys/proc.h> #include <sys/mutex.h> +#include <sys/mutex.h> +#include <sys/proc.h> +#include <sys/sysctl.h> #include <machine/bus.h> #include <sys/rman.h> #ifdef NPX_DEBUG diff --git a/sys/i386/isa/pcvt/pcvt_hdr.h b/sys/i386/isa/pcvt/pcvt_hdr.h index 1151298..4c9f540 100644 --- a/sys/i386/isa/pcvt/pcvt_hdr.h +++ b/sys/i386/isa/pcvt/pcvt_hdr.h @@ -52,18 +52,20 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/conf.h> -#include <sys/proc.h> -#include <sys/signalvar.h> -#include <sys/tty.h> -#include <sys/uio.h> #include <sys/callout.h> +#include <sys/conf.h> +#include <sys/cons.h> #include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/malloc.h> +#include <sys/mutex.h> +#include <sys/proc.h> #include <sys/random.h> +#include <sys/signalvar.h> #include <sys/syslog.h> -#include <sys/malloc.h> #include <sys/time.h> -#include <sys/cons.h> +#include <sys/tty.h> +#include <sys/uio.h> #include <machine/bus.h> #include <machine/psl.h> diff --git a/sys/i386/isa/spigot.c b/sys/i386/isa/spigot.c index bd47467..39e9e33 100644 --- a/sys/i386/isa/spigot.c +++ b/sys/i386/isa/spigot.c @@ -56,12 +56,14 @@ error "Can only have 1 spigot configured." #include <sys/param.h> #include <sys/systm.h> -#include <sys/kernel.h> +#include <sys/bus.h> #include <sys/conf.h> +#include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/mman.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/signalvar.h> -#include <sys/mman.h> -#include <sys/bus.h> #include <machine/frame.h> #include <machine/md_var.h> diff --git a/sys/i386/linux/imgact_linux.c b/sys/i386/linux/imgact_linux.c index 48e14f0..d86c62d 100644 --- a/sys/i386/linux/imgact_linux.c +++ b/sys/i386/linux/imgact_linux.c @@ -33,14 +33,15 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/resourcevar.h> #include <sys/exec.h> -#include <sys/mman.h> #include <sys/imgact.h> #include <sys/imgact_aout.h> #include <sys/kernel.h> #include <sys/lock.h> +#include <sys/mman.h> +#include <sys/mutex.h> #include <sys/proc.h> +#include <sys/resourcevar.h> #include <sys/vnode.h> #include <vm/vm.h> diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c index aaa5cac..fe43527 100644 --- a/sys/i386/linux/linux_machdep.c +++ b/sys/i386/linux/linux_machdep.c @@ -29,13 +29,14 @@ */ #include <sys/param.h> +#include <sys/systm.h> #include <sys/mman.h> +#include <sys/mutex.h> #include <sys/proc.h> -#include <sys/sysproto.h> -#include <sys/systm.h> -#include <sys/unistd.h> #include <sys/resource.h> #include <sys/resourcevar.h> +#include <sys/sysproto.h> +#include <sys/unistd.h> #include <machine/frame.h> #include <machine/psl.h> diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index 8050392..e461eab 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -37,14 +37,15 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/proc.h> -#include <sys/sysproto.h> -#include <sys/sysent.h> #include <sys/imgact.h> #include <sys/imgact_aout.h> #include <sys/imgact_elf.h> -#include <sys/signalvar.h> #include <sys/malloc.h> +#include <sys/proc.h> +#include <sys/signalvar.h> +#include <sys/sysent.h> +#include <sys/sysproto.h> + #include <vm/vm.h> #include <vm/vm_param.h> #include <vm/vm_page.h> @@ -53,6 +54,8 @@ #include <sys/kernel.h> #include <sys/module.h> #include <machine/cpu.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <i386/linux/linux.h> #include <i386/linux/linux_proto.h> diff --git a/sys/i386/svr4/svr4_machdep.c b/sys/i386/svr4/svr4_machdep.c index 1541835..7346f07 100644 --- a/sys/i386/svr4/svr4_machdep.c +++ b/sys/i386/svr4/svr4_machdep.c @@ -31,12 +31,11 @@ #include <sys/types.h> #include <sys/param.h> #include <sys/systm.h> -#include <sys/proc.h> #include <sys/exec.h> -#include <sys/lock.h> -#include <vm/vm.h> -#include <vm/pmap.h> #include <sys/filedesc.h> +#include <sys/lock.h> +#include <sys/mutex.h> +#include <sys/proc.h> #include <sys/signal.h> #include <sys/signalvar.h> @@ -49,6 +48,9 @@ #include <machine/vm86.h> #include <machine/vmparam.h> +#include <vm/vm.h> +#include <vm/pmap.h> + #include <compat/svr4/svr4.h> #include <compat/svr4/svr4_types.h> #include <compat/svr4/svr4_signal.h> diff --git a/sys/isa/fd.c b/sys/isa/fd.c index 4b7789b..285aed8 100644 --- a/sys/isa/fd.c +++ b/sys/isa/fd.c @@ -56,15 +56,17 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/kernel.h> #include <sys/bio.h> #include <sys/bus.h> #include <sys/conf.h> -#include <sys/disklabel.h> #include <sys/devicestat.h> +#include <sys/disklabel.h> #include <sys/fcntl.h> +#include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/module.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/syslog.h> diff --git a/sys/isa/sio.c b/sys/isa/sio.c index d1a876b..ab9cf09 100644 --- a/sys/isa/sio.c +++ b/sys/isa/sio.c @@ -52,22 +52,24 @@ * - Added PC-Card driver table and handlers */ #include <sys/param.h> -#include <sys/bus.h> #include <sys/systm.h> -#include <sys/reboot.h> -#include <sys/malloc.h> -#include <sys/tty.h> -#include <sys/proc.h> -#include <sys/module.h> +#include <sys/bus.h> +#include <sys/bus.h> #include <sys/conf.h> #include <sys/dkstat.h> #include <sys/fcntl.h> #include <sys/interrupt.h> #include <sys/ipl.h> #include <sys/kernel.h> -#include <sys/syslog.h> +#include <sys/lock.h> +#include <sys/malloc.h> +#include <sys/module.h> +#include <sys/mutex.h> +#include <sys/proc.h> +#include <sys/reboot.h> #include <sys/sysctl.h> -#include <sys/bus.h> +#include <sys/syslog.h> +#include <sys/tty.h> #include <machine/bus_pio.h> #include <machine/bus.h> #include <sys/rman.h> diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c index 32f2630..9478eb3 100644 --- a/sys/kern/imgact_aout.c +++ b/sys/kern/imgact_aout.c @@ -27,30 +27,32 @@ */ #include <sys/param.h> -#include <sys/resourcevar.h> #include <sys/exec.h> #include <sys/fcntl.h> #include <sys/imgact.h> #include <sys/imgact_aout.h> #include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/namei.h> #include <sys/pioctl.h> #include <sys/proc.h> +#include <sys/resourcevar.h> #include <sys/systm.h> #include <sys/signalvar.h> #include <sys/stat.h> #include <sys/sysent.h> #include <sys/syscall.h> #include <sys/vnode.h> +#include <sys/user.h> + #include <machine/md_var.h> #include <vm/vm.h> #include <vm/vm_param.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> #include <vm/vm_object.h> -#include <sys/user.h> static int exec_aout_imgact __P((struct image_params *imgp)); diff --git a/sys/kern/imgact_gzip.c b/sys/kern/imgact_gzip.c index c6d73eb..00f9040 100644 --- a/sys/kern/imgact_gzip.c +++ b/sys/kern/imgact_gzip.c @@ -26,7 +26,9 @@ #include <sys/imgact.h> #include <sys/imgact_aout.h> #include <sys/kernel.h> +#include <sys/lock.h> #include <sys/mman.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/resourcevar.h> #include <sys/sysent.h> @@ -36,7 +38,6 @@ #include <vm/vm.h> #include <vm/vm_param.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> #include <vm/vm_kern.h> diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c index cfa8cbe..7562e31 100644 --- a/sys/kern/kern_acct.c +++ b/sys/kern/kern_acct.c @@ -42,6 +42,8 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/sysproto.h> #include <sys/proc.h> #include <sys/mount.h> diff --git a/sys/kern/kern_condvar.c b/sys/kern/kern_condvar.c index 16007ec..1087fc6 100644 --- a/sys/kern/kern_condvar.c +++ b/sys/kern/kern_condvar.c @@ -30,11 +30,12 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/kernel.h> #include <sys/ktr.h> #include <sys/condvar.h> -#include <sys/mutex.h> #include <sys/signalvar.h> #include <sys/resourcevar.h> #ifdef KTRACE diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 9a0a25c..f89e413 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -42,6 +42,8 @@ #include "opt_compat.h" #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/sysproto.h> #include <sys/conf.h> #include <sys/filedesc.h> diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 4156460..d4d588e 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -29,6 +29,8 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/malloc.h> #include <sys/unistd.h> diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index cbd91dd..0b1b29e 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -28,11 +28,12 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/sysproto.h> #include <sys/signalvar.h> #include <sys/kernel.h> #include <sys/mount.h> -#include <sys/mutex.h> #include <sys/filedesc.h> #include <sys/fcntl.h> #include <sys/acct.h> @@ -51,7 +52,6 @@ #include <vm/vm.h> #include <vm/vm_param.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_page.h> #include <vm/vm_map.h> diff --git a/sys/kern/kern_idle.c b/sys/kern/kern_idle.c index f7dd122..8691f35 100644 --- a/sys/kern/kern_idle.c +++ b/sys/kern/kern_idle.c @@ -8,9 +8,11 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/proc.h> #include <sys/kernel.h> #include <sys/ktr.h> +#include <sys/lock.h> +#include <sys/mutex.h> +#include <sys/proc.h> #include <sys/signalvar.h> #include <sys/smp.h> #include <sys/resourcevar.h> @@ -19,7 +21,6 @@ #include <sys/unistd.h> #include <sys/ipl.h> #include <sys/kthread.h> -#include <sys/mutex.h> #include <sys/queue.h> #include <sys/eventhandler.h> #include <vm/vm.h> diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 393d3da..ce972bd 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -38,11 +38,12 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/sysproto.h> #include <sys/kernel.h> #include <sys/proc.h> #include <sys/fcntl.h> -#include <sys/lock.h> #include <sys/namei.h> #include <sys/vnode.h> #include <sys/ktrace.h> diff --git a/sys/kern/kern_lockf.c b/sys/kern/kern_lockf.c index 8f210b2..ad3cb70 100644 --- a/sys/kern/kern_lockf.c +++ b/sys/kern/kern_lockf.c @@ -43,6 +43,7 @@ #include <sys/systm.h> #include <sys/kernel.h> #include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/unistd.h> #include <sys/vnode.h> diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index ad0d0e9..44666b4 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -39,11 +39,11 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/mbuf.h> #include <sys/mutex.h> #include <sys/vmmeter.h> -#include <sys/lock.h> #include <sys/proc.h> #include <vm/vm.h> diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index 6db0e8d..72d4815 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -60,8 +60,8 @@ #include <sys/param.h> #include <sys/bus.h> #include <sys/kernel.h> -#include <sys/malloc.h> #include <sys/lock.h> +#include <sys/malloc.h> #include <sys/mutex.h> #include <sys/proc.h> #include <sys/sysctl.h> diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 8019a27..d441144 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -37,20 +37,22 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> -#include <sys/sysctl.h> +#include <sys/lock.h> #include <sys/malloc.h> +#include <sys/mutex.h> #include <sys/proc.h> +#include <sys/sysctl.h> #include <sys/filedesc.h> #include <sys/tty.h> #include <sys/signalvar.h> #include <sys/sx.h> +#include <sys/user.h> +#include <sys/jail.h> + #include <vm/vm.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> -#include <sys/user.h> #include <vm/vm_zone.h> -#include <sys/jail.h> static MALLOC_DEFINE(M_PGRP, "pgrp", "process group header"); MALLOC_DEFINE(M_SESSION, "session", "session header"); diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 64fcbf9..127d10c 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -47,12 +47,13 @@ #include "opt_global.h" #include <sys/param.h> -#include <sys/acct.h> #include <sys/systm.h> -#include <sys/sysproto.h> +#include <sys/acct.h> #include <sys/kernel.h> #include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> +#include <sys/sysproto.h> #include <sys/malloc.h> #include <sys/pioctl.h> #include <sys/resourcevar.h> diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c index ac4bad6..8fb2499 100644 --- a/sys/kern/kern_subr.c +++ b/sys/kern/kern_subr.c @@ -43,10 +43,10 @@ #include <sys/systm.h> #include <sys/kernel.h> #include <sys/ktr.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/malloc.h> -#include <sys/mutex.h> -#include <sys/lock.h> #include <sys/resourcevar.h> #include <sys/vnode.h> diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 7ad9c17..60a2563 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -36,6 +36,8 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/sysproto.h> #include <sys/resourcevar.h> #include <sys/signalvar.h> @@ -46,6 +48,7 @@ #include <sys/time.h> #include <sys/timetc.h> #include <sys/vnode.h> + #include <vm/vm.h> #include <vm/vm_extern.h> diff --git a/sys/kern/ksched.c b/sys/kern/ksched.c index dbdc174..c7f746a 100644 --- a/sys/kern/ksched.c +++ b/sys/kern/ksched.c @@ -37,8 +37,9 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/proc.h> +#include <sys/lock.h> #include <sys/mutex.h> +#include <sys/proc.h> #include <sys/resource.h> #include <posix4/posix4.h> diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index 8327794..344f163 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -29,19 +29,20 @@ #include "opt_ddb.h" #include <sys/param.h> -#include <sys/kernel.h> #include <sys/systm.h> +#include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/proc.h> #include <sys/namei.h> #include <sys/fcntl.h> #include <sys/vnode.h> #include <sys/linker.h> + #include <machine/elf.h> #include <vm/vm.h> #include <vm/vm_param.h> -#include <sys/lock.h> #ifdef SPARSE_MAPPING #include <vm/vm_object.h> #include <vm/vm_kern.h> @@ -49,6 +50,7 @@ #endif #include <vm/pmap.h> #include <vm/vm_map.h> + #ifdef __AOUT__ #include <nlist.h> #endif diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index 8327794..344f163 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -29,19 +29,20 @@ #include "opt_ddb.h" #include <sys/param.h> -#include <sys/kernel.h> #include <sys/systm.h> +#include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/proc.h> #include <sys/namei.h> #include <sys/fcntl.h> #include <sys/vnode.h> #include <sys/linker.h> + #include <machine/elf.h> #include <vm/vm.h> #include <vm/vm_param.h> -#include <sys/lock.h> #ifdef SPARSE_MAPPING #include <vm/vm_object.h> #include <vm/vm_kern.h> @@ -49,6 +50,7 @@ #endif #include <vm/pmap.h> #include <vm/vm_map.h> + #ifdef __AOUT__ #include <nlist.h> #endif diff --git a/sys/kern/p1003_1b.c b/sys/kern/p1003_1b.c index 0d1fd0e..577456f 100644 --- a/sys/kern/p1003_1b.c +++ b/sys/kern/p1003_1b.c @@ -38,12 +38,14 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> -#include <sys/sysent.h> +#include <sys/lock.h> +#include <sys/module.h> +#include <sys/mutex.h> #include <sys/proc.h> +#include <sys/sysctl.h> +#include <sys/sysent.h> #include <sys/syslog.h> -#include <sys/module.h> #include <sys/sysproto.h> -#include <sys/sysctl.h> #include <posix4/posix4.h> diff --git a/sys/kern/subr_eventhandler.c b/sys/kern/subr_eventhandler.c index 5e1ce48..9e5d5c3 100644 --- a/sys/kern/subr_eventhandler.c +++ b/sys/kern/subr_eventhandler.c @@ -31,6 +31,7 @@ #include <sys/lock.h> #include <sys/malloc.h> #include <sys/mutex.h> +#include <sys/proc.h> #include <sys/systm.h> #include <sys/eventhandler.h> diff --git a/sys/kern/subr_prof.c b/sys/kern/subr_prof.c index ce71fb6..ff8317e 100644 --- a/sys/kern/subr_prof.c +++ b/sys/kern/subr_prof.c @@ -39,6 +39,8 @@ #include <sys/sysproto.h> #include <sys/ipl.h> #include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/resourcevar.h> #include <sys/sysctl.h> diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c index 6db0e8d..72d4815 100644 --- a/sys/kern/subr_turnstile.c +++ b/sys/kern/subr_turnstile.c @@ -60,8 +60,8 @@ #include <sys/param.h> #include <sys/bus.h> #include <sys/kernel.h> -#include <sys/malloc.h> #include <sys/lock.h> +#include <sys/malloc.h> #include <sys/mutex.h> #include <sys/proc.h> #include <sys/sysctl.h> diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 42786d9..3e63b95 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -51,11 +51,11 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/proc.h> #include <sys/fcntl.h> #include <sys/file.h> #include <sys/filedesc.h> #include <sys/filio.h> +#include <sys/lock.h> #include <sys/ttycom.h> #include <sys/stat.h> #include <sys/poll.h> @@ -63,13 +63,13 @@ #include <sys/signalvar.h> #include <sys/sysproto.h> #include <sys/pipe.h> +#include <sys/proc.h> #include <sys/vnode.h> #include <sys/uio.h> #include <sys/event.h> #include <vm/vm.h> #include <vm/vm_param.h> -#include <sys/lock.h> #include <vm/vm_object.h> #include <vm/vm_kern.h> #include <vm/vm_extern.h> diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index f6af557..d08f342 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -33,20 +33,22 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/sysproto.h> #include <sys/proc.h> #include <sys/vnode.h> #include <sys/ptrace.h> #include <sys/sx.h> +#include <sys/user.h> #include <machine/reg.h> + #include <vm/vm.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> #include <vm/vm_page.h> -#include <sys/user.h> #include <miscfs/procfs/procfs.h> /* use the equivalent procfs code */ diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 3bfd49a..81b27f3 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -37,8 +37,8 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/sysproto.h> #include <sys/kernel.h> +#include <sys/lock.h> #include <sys/sysctl.h> #include <sys/shm.h> #include <sys/proc.h> @@ -47,11 +47,11 @@ #include <sys/stat.h> #include <sys/syscall.h> #include <sys/sysent.h> +#include <sys/sysproto.h> #include <sys/jail.h> #include <vm/vm.h> #include <vm/vm_param.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_object.h> #include <vm/vm_map.h> diff --git a/sys/kern/tty.c b/sys/kern/tty.c index d57135d..ee152b7 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -74,6 +74,8 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/filio.h> +#include <sys/lock.h> +#include <sys/mutex.h> #if defined(COMPAT_43) || defined(COMPAT_SUNOS) #include <sys/ioctl_compat.h> #endif @@ -97,7 +99,6 @@ #include <sys/sysctl.h> #include <vm/vm.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> diff --git a/sys/kern/tty_tty.c b/sys/kern/tty_tty.c index 5ad470b..d1d9705 100644 --- a/sys/kern/tty_tty.c +++ b/sys/kern/tty_tty.c @@ -41,11 +41,11 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/conf.h> +#include <sys/kernel.h> #include <sys/lock.h> #include <sys/proc.h> #include <sys/ttycom.h> #include <sys/vnode.h> -#include <sys/kernel.h> static d_open_t cttyopen; static d_read_t cttyread; diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index 70bbc45..c84487c 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -37,14 +37,16 @@ #include "opt_param.h" #include <sys/param.h> #include <sys/systm.h> +#include <sys/condvar.h> +#include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/mbuf.h> #include <sys/mutex.h> -#include <sys/condvar.h> -#include <sys/kernel.h> #include <sys/sysctl.h> #include <sys/domain.h> #include <sys/protosw.h> + #include <vm/vm.h> #include <vm/vm_kern.h> #include <vm/vm_extern.h> diff --git a/sys/kern/uipc_mbuf2.c b/sys/kern/uipc_mbuf2.c index 16e961e..b00bf7f 100644 --- a/sys/kern/uipc_mbuf2.c +++ b/sys/kern/uipc_mbuf2.c @@ -70,8 +70,10 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/mbuf.h> +#include <sys/mutex.h> /* * ensure that [off, off + len) is contiguous on the mbuf chain "m". diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c index 5da42b0..9b23c85 100644 --- a/sys/kern/uipc_sockbuf.c +++ b/sys/kern/uipc_sockbuf.c @@ -40,9 +40,11 @@ #include <sys/domain.h> #include <sys/file.h> /* for maxfiles */ #include <sys/kernel.h> -#include <sys/proc.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/malloc.h> #include <sys/mbuf.h> +#include <sys/proc.h> #include <sys/protosw.h> #include <sys/resourcevar.h> #include <sys/stat.h> diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 837d0a4..9a2cb93 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -39,8 +39,10 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/fcntl.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/mbuf.h> +#include <sys/mutex.h> #include <sys/domain.h> #include <sys/file.h> /* for struct knote */ #include <sys/kernel.h> @@ -56,6 +58,7 @@ #include <sys/sysctl.h> #include <sys/uio.h> #include <sys/jail.h> + #include <vm/vm_zone.h> #include <machine/limits.h> diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c index 5da42b0..9b23c85 100644 --- a/sys/kern/uipc_socket2.c +++ b/sys/kern/uipc_socket2.c @@ -40,9 +40,11 @@ #include <sys/domain.h> #include <sys/file.h> /* for maxfiles */ #include <sys/kernel.h> -#include <sys/proc.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/malloc.h> #include <sys/mbuf.h> +#include <sys/proc.h> #include <sys/protosw.h> #include <sys/resourcevar.h> #include <sys/stat.h> diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index a8172a3..291ef9f 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -43,6 +43,8 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/sysproto.h> #include <sys/malloc.h> #include <sys/filedesc.h> @@ -50,6 +52,8 @@ #include <sys/proc.h> #include <sys/fcntl.h> #include <sys/file.h> +#include <sys/lock.h> +#include <sys/mount.h> #include <sys/mbuf.h> #include <sys/protosw.h> #include <sys/socket.h> @@ -57,11 +61,10 @@ #include <sys/signalvar.h> #include <sys/uio.h> #include <sys/vnode.h> -#include <sys/lock.h> -#include <sys/mount.h> #ifdef KTRACE #include <sys/ktrace.h> #endif + #include <vm/vm.h> #include <vm/vm_object.h> #include <vm/vm_page.h> diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index a26754c..33ff735 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -37,11 +37,13 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> -#include <sys/domain.h> #include <sys/fcntl.h> +#include <sys/domain.h> +#include <sys/filedesc.h> +#include <sys/lock.h> #include <sys/malloc.h> /* XXX must be before <sys/file.h> */ #include <sys/file.h> -#include <sys/filedesc.h> +#include <sys/mutex.h> #include <sys/mbuf.h> #include <sys/namei.h> #include <sys/proc.h> diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 2299e70..ceb3c72 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -40,6 +40,7 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> +#include <sys/lock.h> #include <sys/sysctl.h> #include <sys/mount.h> #include <sys/vnode.h> diff --git a/sys/kern/vfs_conf.c b/sys/kern/vfs_conf.c index 34fba78..e651ef0 100644 --- a/sys/kern/vfs_conf.c +++ b/sys/kern/vfs_conf.c @@ -45,8 +45,10 @@ #include "opt_rootdevname.h" #include <sys/param.h> -#include <sys/kernel.h> #include <sys/systm.h> +#include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/vnode.h> #include <sys/mount.h> #include <sys/malloc.h> @@ -55,13 +57,16 @@ #include <sys/disklabel.h> #include <sys/conf.h> #include <sys/cons.h> -#include <paths.h> +#include <sys/proc.h> #include "opt_ddb.h" + #ifdef DDB #include <ddb/ddb.h> #endif +#include <paths.h> + MALLOC_DEFINE(M_MOUNT, "mount", "vfs mount structure"); #define ROOTNAME "root_device" diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index c95e020..0ad9d65 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -44,12 +44,12 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> +#include <sys/lock.h> #include <sys/namei.h> #include <sys/vnode.h> #include <sys/mount.h> #include <sys/filedesc.h> #include <sys/proc.h> - #ifdef KTRACE #include <sys/ktrace.h> #endif diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 34fba78..e651ef0 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -45,8 +45,10 @@ #include "opt_rootdevname.h" #include <sys/param.h> -#include <sys/kernel.h> #include <sys/systm.h> +#include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/vnode.h> #include <sys/mount.h> #include <sys/malloc.h> @@ -55,13 +57,16 @@ #include <sys/disklabel.h> #include <sys/conf.h> #include <sys/cons.h> -#include <paths.h> +#include <sys/proc.h> #include "opt_ddb.h" + #ifdef DDB #include <ddb/ddb.h> #endif +#include <paths.h> + MALLOC_DEFINE(M_MOUNT, "mount", "vfs mount structure"); #define ROOTNAME "root_device" diff --git a/sys/miscfs/deadfs/dead_vnops.c b/sys/miscfs/deadfs/dead_vnops.c index 8de5c57..9911453 100644 --- a/sys/miscfs/deadfs/dead_vnops.c +++ b/sys/miscfs/deadfs/dead_vnops.c @@ -38,10 +38,9 @@ #include <sys/systm.h> #include <sys/kernel.h> #include <sys/lock.h> -#include <sys/vnode.h> +#include <sys/mutex.h> #include <sys/poll.h> - -#include <machine/mutex.h> +#include <sys/vnode.h> static int chkvnlock __P((struct vnode *)); /* diff --git a/sys/miscfs/fdesc/fdesc_vfsops.c b/sys/miscfs/fdesc/fdesc_vfsops.c index e93ad50..900e1de 100644 --- a/sys/miscfs/fdesc/fdesc_vfsops.c +++ b/sys/miscfs/fdesc/fdesc_vfsops.c @@ -44,15 +44,16 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/filedesc.h> #include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/malloc.h> +#include <sys/mount.h> #include <sys/proc.h> #include <sys/resourcevar.h> -#include <sys/filedesc.h> -#include <sys/vnode.h> -#include <net/radix.h> #include <sys/socket.h> -#include <sys/mount.h> -#include <sys/malloc.h> +#include <sys/vnode.h> + #include <miscfs/fdesc/fdesc.h> static MALLOC_DEFINE(M_FDESCMNT, "FDESC mount", "FDESC mount structure"); diff --git a/sys/miscfs/fdesc/fdesc_vnops.c b/sys/miscfs/fdesc/fdesc_vnops.c index 5846ac7..065e0a8 100644 --- a/sys/miscfs/fdesc/fdesc_vnops.c +++ b/sys/miscfs/fdesc/fdesc_vnops.c @@ -44,19 +44,20 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/proc.h> -#include <sys/kernel.h> /* boottime */ +#include <sys/conf.h> +#include <sys/dirent.h> #include <sys/filedesc.h> -#include <sys/vnode.h> +#include <sys/kernel.h> /* boottime */ +#include <sys/lock.h> #include <sys/malloc.h> -#include <sys/file.h> -#include <sys/stat.h> -#include <net/radix.h> -#include <sys/socket.h> +#include <sys/file.h> /* Must come after sys/malloc.h */ #include <sys/mount.h> #include <sys/namei.h> -#include <sys/dirent.h> -#include <sys/conf.h> +#include <sys/proc.h> +#include <sys/socket.h> +#include <sys/stat.h> +#include <sys/vnode.h> + #include <miscfs/fdesc/fdesc.h> #define FDL_WANT 0x01 diff --git a/sys/miscfs/nullfs/null_subr.c b/sys/miscfs/nullfs/null_subr.c index fe5f988..88f1584 100644 --- a/sys/miscfs/nullfs/null_subr.c +++ b/sys/miscfs/nullfs/null_subr.c @@ -41,9 +41,12 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> -#include <sys/vnode.h> -#include <sys/mount.h> +#include <sys/lock.h> #include <sys/malloc.h> +#include <sys/mount.h> +#include <sys/proc.h> +#include <sys/vnode.h> + #include <miscfs/nullfs/null.h> #define LOG2_SIZEVNODE 7 /* log2(sizeof struct vnode) */ diff --git a/sys/miscfs/nullfs/null_vfsops.c b/sys/miscfs/nullfs/null_vfsops.c index c9a6801..dfaefe3 100644 --- a/sys/miscfs/nullfs/null_vfsops.c +++ b/sys/miscfs/nullfs/null_vfsops.c @@ -47,10 +47,13 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> -#include <sys/vnode.h> #include <sys/mount.h> #include <sys/namei.h> +#include <sys/proc.h> +#include <sys/vnode.h> + #include <miscfs/nullfs/null.h> static MALLOC_DEFINE(M_NULLFSMNT, "NULLFS mount", "NULLFS mount structure"); diff --git a/sys/miscfs/nullfs/null_vnops.c b/sys/miscfs/nullfs/null_vnops.c index e9fded7..d37ef73 100644 --- a/sys/miscfs/nullfs/null_vnops.c +++ b/sys/miscfs/nullfs/null_vnops.c @@ -175,13 +175,16 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/kernel.h> #include <sys/conf.h> -#include <sys/sysctl.h> -#include <sys/vnode.h> +#include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/malloc.h> #include <sys/mount.h> +#include <sys/mutex.h> #include <sys/namei.h> -#include <sys/malloc.h> +#include <sys/sysctl.h> +#include <sys/vnode.h> + #include <miscfs/nullfs/null.h> #include <vm/vm.h> diff --git a/sys/miscfs/portal/portal_vfsops.c b/sys/miscfs/portal/portal_vfsops.c index 3f7903c..5146456 100644 --- a/sys/miscfs/portal/portal_vfsops.c +++ b/sys/miscfs/portal/portal_vfsops.c @@ -44,17 +44,19 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/kernel.h> -#include <sys/proc.h> +#include <sys/domain.h> #include <sys/filedesc.h> -#include <sys/file.h> -#include <sys/vnode.h> -#include <sys/mount.h> +#include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> +#include <sys/file.h> /* Must come after sys/malloc.h */ +#include <sys/mount.h> +#include <sys/proc.h> +#include <sys/protosw.h> #include <sys/socket.h> #include <sys/socketvar.h> -#include <sys/protosw.h> -#include <sys/domain.h> +#include <sys/vnode.h> + #include <miscfs/portal/portal.h> static MALLOC_DEFINE(M_PORTALFSMNT, "PORTAL mount", "PORTAL mount structure"); diff --git a/sys/miscfs/procfs/procfs_ctl.c b/sys/miscfs/procfs/procfs_ctl.c index f0a5427..5818758 100644 --- a/sys/miscfs/procfs/procfs_ctl.c +++ b/sys/miscfs/procfs/procfs_ctl.c @@ -40,11 +40,14 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> -#include <sys/vnode.h> #include <sys/ptrace.h> #include <sys/signalvar.h> #include <sys/sx.h> +#include <sys/vnode.h> + #include <miscfs/procfs/procfs.h> #include <vm/vm.h> diff --git a/sys/miscfs/procfs/procfs_dbregs.c b/sys/miscfs/procfs/procfs_dbregs.c index 9487569..d80e28c 100644 --- a/sys/miscfs/procfs/procfs_dbregs.c +++ b/sys/miscfs/procfs/procfs_dbregs.c @@ -44,11 +44,16 @@ */ #include <sys/param.h> +#include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/vnode.h> -#include <sys/systm.h> + #include <machine/reg.h> + #include <miscfs/procfs/procfs.h> + #include <vm/vm.h> int diff --git a/sys/miscfs/procfs/procfs_fpregs.c b/sys/miscfs/procfs/procfs_fpregs.c index 6249f52..7e2ff52 100644 --- a/sys/miscfs/procfs/procfs_fpregs.c +++ b/sys/miscfs/procfs/procfs_fpregs.c @@ -41,11 +41,16 @@ */ #include <sys/param.h> +#include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/vnode.h> -#include <sys/systm.h> + #include <machine/reg.h> + #include <miscfs/procfs/procfs.h> + #include <vm/vm.h> int diff --git a/sys/miscfs/procfs/procfs_map.c b/sys/miscfs/procfs/procfs_map.c index 1caa630..5e4a30c 100644 --- a/sys/miscfs/procfs/procfs_map.c +++ b/sys/miscfs/procfs/procfs_map.c @@ -41,12 +41,13 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> #include <sys/proc.h> #include <sys/vnode.h> + #include <miscfs/procfs/procfs.h> #include <vm/vm.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> #include <vm/vm_page.h> diff --git a/sys/miscfs/procfs/procfs_mem.c b/sys/miscfs/procfs/procfs_mem.c index 6f2c8cb..3a2f8d2 100644 --- a/sys/miscfs/procfs/procfs_mem.c +++ b/sys/miscfs/procfs/procfs_mem.c @@ -47,20 +47,22 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> #include <sys/proc.h> +#include <sys/ptrace.h> +#include <sys/user.h> #include <sys/vnode.h> + #include <miscfs/procfs/procfs.h> + #include <vm/vm.h> #include <vm/vm_param.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_extern.h> #include <vm/vm_map.h> #include <vm/vm_kern.h> #include <vm/vm_object.h> #include <vm/vm_page.h> -#include <sys/user.h> -#include <sys/ptrace.h> static int procfs_rwmem __P((struct proc *curp, struct proc *p, struct uio *uio)); diff --git a/sys/miscfs/procfs/procfs_regs.c b/sys/miscfs/procfs/procfs_regs.c index 12efe85..ba58517 100644 --- a/sys/miscfs/procfs/procfs_regs.c +++ b/sys/miscfs/procfs/procfs_regs.c @@ -41,14 +41,19 @@ */ #include <sys/param.h> +#include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/vnode.h> -#include <sys/systm.h> + #include <machine/reg.h> -#include <miscfs/procfs/procfs.h> + #include <vm/vm.h> #include <vm/vm_extern.h> +#include <miscfs/procfs/procfs.h> + int procfs_doregs(curp, p, pfs, uio) struct proc *curp; diff --git a/sys/miscfs/procfs/procfs_status.c b/sys/miscfs/procfs/procfs_status.c index 40e3fbe..b29b4a9 100644 --- a/sys/miscfs/procfs/procfs_status.c +++ b/sys/miscfs/procfs/procfs_status.c @@ -42,18 +42,21 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/exec.h> +#include <sys/jail.h> +#include <sys/lock.h> #include <sys/malloc.h> +#include <sys/mutex.h> #include <sys/proc.h> -#include <sys/jail.h> -#include <sys/vnode.h> -#include <sys/tty.h> #include <sys/resourcevar.h> -#include <miscfs/procfs/procfs.h> +#include <sys/tty.h> +#include <sys/vnode.h> #include <vm/vm.h> #include <vm/pmap.h> #include <vm/vm_param.h> -#include <sys/exec.h> + +#include <miscfs/procfs/procfs.h> #define DOCHECK() do { if (ps >= psbuf+sizeof(psbuf)) goto bailout; } while (0) int diff --git a/sys/miscfs/procfs/procfs_subr.c b/sys/miscfs/procfs/procfs_subr.c index b960b13..64adecb 100644 --- a/sys/miscfs/procfs/procfs_subr.c +++ b/sys/miscfs/procfs/procfs_subr.c @@ -41,13 +41,14 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/sysctl.h> +#include <sys/lock.h> +#include <sys/malloc.h> +#include <sys/mount.h> +#include <sys/mutex.h> #include <sys/proc.h> -#include <net/radix.h> #include <sys/socket.h> -#include <sys/mount.h> +#include <sys/sysctl.h> #include <sys/vnode.h> -#include <sys/malloc.h> #include <miscfs/procfs/procfs.h> diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c index f7201fb..2e7b7cb 100644 --- a/sys/miscfs/procfs/procfs_vnops.c +++ b/sys/miscfs/procfs/procfs_vnops.c @@ -45,23 +45,28 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/time.h> +#include <sys/dirent.h> +#include <sys/fcntl.h> #include <sys/kernel.h> #include <sys/lock.h> -#include <sys/fcntl.h> +#include <sys/malloc.h> +#include <sys/mount.h> +#include <sys/mutex.h> +#include <sys/namei.h> +#include <sys/pioctl.h> #include <sys/proc.h> #include <sys/signalvar.h> +#include <sys/socket.h> #include <sys/sx.h> -#include <sys/vnode.h> +#include <sys/time.h> #include <sys/uio.h> -#include <sys/mount.h> -#include <sys/namei.h> -#include <sys/dirent.h> -#include <sys/malloc.h> +#include <sys/vnode.h> + #include <machine/reg.h> + #include <vm/vm_zone.h> + #include <miscfs/procfs/procfs.h> -#include <sys/pioctl.h> static int procfs_access __P((struct vop_access_args *)); static int procfs_badop __P((void)); diff --git a/sys/miscfs/umapfs/umap_subr.c b/sys/miscfs/umapfs/umap_subr.c index 9b9806e..1f94d50 100644 --- a/sys/miscfs/umapfs/umap_subr.c +++ b/sys/miscfs/umapfs/umap_subr.c @@ -40,9 +40,11 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/vnode.h> -#include <sys/mount.h> #include <sys/malloc.h> +#include <sys/mount.h> +#include <sys/proc.h> +#include <sys/vnode.h> + #include <miscfs/umapfs/umap.h> #define LOG2_SIZEVNODE 7 /* log2(sizeof struct vnode) */ diff --git a/sys/miscfs/umapfs/umap_vfsops.c b/sys/miscfs/umapfs/umap_vfsops.c index abd1b07..e86467d 100644 --- a/sys/miscfs/umapfs/umap_vfsops.c +++ b/sys/miscfs/umapfs/umap_vfsops.c @@ -46,10 +46,13 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> -#include <sys/vnode.h> +#include <sys/lock.h> +#include <sys/malloc.h> #include <sys/mount.h> +#include <sys/mutex.h> #include <sys/namei.h> -#include <sys/malloc.h> +#include <sys/vnode.h> + #include <miscfs/umapfs/umap.h> static MALLOC_DEFINE(M_UMAPFSMNT, "UMAP mount", "UMAP mount structure"); diff --git a/sys/miscfs/umapfs/umap_vnops.c b/sys/miscfs/umapfs/umap_vnops.c index 669a9ae..5bf29c8 100644 --- a/sys/miscfs/umapfs/umap_vnops.c +++ b/sys/miscfs/umapfs/umap_vnops.c @@ -44,11 +44,13 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> -#include <sys/sysctl.h> -#include <sys/vnode.h> +#include <sys/lock.h> +#include <sys/malloc.h> #include <sys/mount.h> #include <sys/namei.h> -#include <sys/malloc.h> +#include <sys/sysctl.h> +#include <sys/vnode.h> + #include <miscfs/umapfs/umap.h> #include <miscfs/nullfs/null.h> diff --git a/sys/miscfs/union/union_subr.c b/sys/miscfs/union/union_subr.c index 71eae9c..b4f2802 100644 --- a/sys/miscfs/union/union_subr.c +++ b/sys/miscfs/union/union_subr.c @@ -40,20 +40,23 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/kernel.h> -#include <sys/vnode.h> -#include <sys/namei.h> -#include <sys/malloc.h> #include <sys/fcntl.h> #include <sys/file.h> #include <sys/filedesc.h> +#include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/malloc.h> #include <sys/module.h> #include <sys/mount.h> +#include <sys/namei.h> #include <sys/stat.h> +#include <sys/vnode.h> + #include <vm/vm.h> #include <vm/vm_extern.h> /* for vnode_pager_setsize */ #include <vm/vm_zone.h> #include <vm/vm_object.h> /* for vm cache coherency */ + #include <miscfs/union/union.h> #include <sys/proc.h> diff --git a/sys/net/bsd_comp.c b/sys/net/bsd_comp.c index 53b5852..62a18cf 100644 --- a/sys/net/bsd_comp.c +++ b/sys/net/bsd_comp.c @@ -45,8 +45,11 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/mbuf.h> +#include <sys/mutex.h> + #include <net/ppp_defs.h> #define PACKETPTR struct mbuf * diff --git a/sys/net/ppp_deflate.c b/sys/net/ppp_deflate.c index d0e4c7b..091fa39 100644 --- a/sys/net/ppp_deflate.c +++ b/sys/net/ppp_deflate.c @@ -31,8 +31,11 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/mbuf.h> +#include <sys/mutex.h> + #include <net/ppp_defs.h> #include <net/zlib.h> diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 9ffbf58..286b420 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -40,13 +40,15 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/domain.h> #include <sys/kernel.h> -#include <sys/sysctl.h> +#include <sys/lock.h> #include <sys/mbuf.h> -#include <sys/domain.h> +#include <sys/mutex.h> #include <sys/protosw.h> #include <sys/socket.h> #include <sys/socketvar.h> +#include <sys/sysctl.h> #include <net/route.h> diff --git a/sys/netipx/spx_usrreq.c b/sys/netipx/spx_usrreq.c index b77b1b3..19ebab9 100644 --- a/sys/netipx/spx_usrreq.c +++ b/sys/netipx/spx_usrreq.c @@ -38,8 +38,10 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/mbuf.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/protosw.h> #include <sys/socket.h> diff --git a/sys/netkey/keysock.c b/sys/netkey/keysock.c index 92e7023..3f0f01d 100644 --- a/sys/netkey/keysock.c +++ b/sys/netkey/keysock.c @@ -37,15 +37,17 @@ #include <sys/types.h> #include <sys/param.h> #include <sys/systm.h> +#include <sys/domain.h> +#include <sys/errno.h> #include <sys/kernel.h> -#include <sys/sysctl.h> -#include <sys/mbuf.h> +#include <sys/lock.h> #include <sys/malloc.h> +#include <sys/mbuf.h> +#include <sys/mutex.h> +#include <sys/protosw.h> #include <sys/socket.h> #include <sys/socketvar.h> -#include <sys/domain.h> -#include <sys/protosw.h> -#include <sys/errno.h> +#include <sys/sysctl.h> #include <machine/ipl.h> diff --git a/sys/netncp/ncp_rq.c b/sys/netncp/ncp_rq.c index 123d208..4bc1d86 100644 --- a/sys/netncp/ncp_rq.c +++ b/sys/netncp/ncp_rq.c @@ -40,6 +40,7 @@ #include <sys/malloc.h> #include <sys/mbuf.h> #include <sys/poll.h> +#include <sys/proc.h> #include <sys/uio.h> #include <netncp/ncp.h> diff --git a/sys/netncp/ncp_subr.c b/sys/netncp/ncp_subr.c index 4d208f9..7c2f0ea 100644 --- a/sys/netncp/ncp_subr.c +++ b/sys/netncp/ncp_subr.c @@ -32,12 +32,13 @@ * $FreeBSD$ */ #include <sys/param.h> -#include <sys/errno.h> -#include <sys/proc.h> #include <sys/systm.h> +#include <sys/errno.h> #include <sys/kernel.h> -#include <sys/sysctl.h> +#include <sys/lock.h> #include <sys/malloc.h> +#include <sys/proc.h> +#include <sys/sysctl.h> #include <sys/time.h> #include <netncp/ncp.h> diff --git a/sys/netsmb/smb_dev.c b/sys/netsmb/smb_dev.c index fe00717..efdf1ff 100644 --- a/sys/netsmb/smb_dev.c +++ b/sys/netsmb/smb_dev.c @@ -34,19 +34,20 @@ #include <sys/param.h> #include <sys/kernel.h> #include <sys/systm.h> +#include <sys/conf.h> +#include <sys/fcntl.h> #include <sys/ioccom.h> +#include <sys/lock.h> #include <sys/malloc.h> -#include <sys/uio.h> -#include <sys/conf.h> +#include <sys/file.h> /* Must come after sys/malloc.h */ #include <sys/mbuf.h> +#include <sys/poll.h> #include <sys/proc.h> -#include <sys/fcntl.h> -#include <sys/file.h> -#include <sys/socket.h> #include <sys/select.h> -#include <sys/poll.h> +#include <sys/socket.h> #include <sys/socketvar.h> #include <sys/sysctl.h> +#include <sys/uio.h> #include <sys/vnode.h> #include <net/if.h> diff --git a/sys/nfs/nfs_lock.c b/sys/nfs/nfs_lock.c index aaac361..9fd243a 100644 --- a/sys/nfs/nfs_lock.c +++ b/sys/nfs/nfs_lock.c @@ -32,17 +32,19 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/fcntl.h> +#include <sys/kernel.h> /* for hz */ +#include <sys/lock.h> #include <sys/malloc.h> +#include <sys/lockf.h> /* for hz */ /* Must come after sys/malloc.h */ #include <sys/mbuf.h> #include <sys/mount.h> #include <sys/namei.h> #include <sys/proc.h> +#include <sys/resourcevar.h> +#include <sys/socket.h> #include <sys/socket.h> #include <sys/unistd.h> #include <sys/vnode.h> -#include <sys/resourcevar.h> -#include <sys/kernel.h> /* for hz */ -#include <sys/lockf.h> /* for hz */ #include <net/if.h> diff --git a/sys/nfs/nfs_node.c b/sys/nfs/nfs_node.c index 0191b66..dc21bc3 100644 --- a/sys/nfs/nfs_node.c +++ b/sys/nfs/nfs_node.c @@ -40,12 +40,15 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/fnv_hash.h> +#include <sys/lock.h> +#include <sys/malloc.h> #include <sys/mount.h> #include <sys/namei.h> -#include <sys/vnode.h> -#include <sys/malloc.h> -#include <sys/fnv_hash.h> +#include <sys/proc.h> +#include <sys/socket.h> #include <sys/sysctl.h> +#include <sys/vnode.h> #include <vm/vm_zone.h> diff --git a/sys/nfs/nfs_nqlease.c b/sys/nfs/nfs_nqlease.c index 3878a77..55b44ba 100644 --- a/sys/nfs/nfs_nqlease.c +++ b/sys/nfs/nfs_nqlease.c @@ -52,15 +52,19 @@ * Equipment Corporation WRL Research Report 89/5, May 1989. */ #include <sys/param.h> -#include <sys/vnode.h> -#include <sys/malloc.h> -#include <sys/mount.h> -#include <sys/kernel.h> #include <sys/systm.h> +#include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/malloc.h> #include <sys/mbuf.h> +#include <sys/mount.h> +#include <sys/mutex.h> +#include <sys/proc.h> +#include <sys/protosw.h> +#include <sys/socket.h> #include <sys/socket.h> #include <sys/socketvar.h> -#include <sys/protosw.h> +#include <sys/vnode.h> #include <vm/vm_zone.h> diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c index fefeea8..5772e4b 100644 --- a/sys/nfs/nfs_socket.c +++ b/sys/nfs/nfs_socket.c @@ -43,18 +43,20 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/proc.h> -#include <sys/malloc.h> -#include <sys/mount.h> #include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/malloc.h> #include <sys/mbuf.h> -#include <sys/vnode.h> +#include <sys/mount.h> +#include <sys/mutex.h> +#include <sys/proc.h> #include <sys/protosw.h> +#include <sys/signalvar.h> #include <sys/socket.h> #include <sys/socketvar.h> -#include <sys/syslog.h> #include <sys/sysctl.h> -#include <sys/signalvar.h> +#include <sys/syslog.h> +#include <sys/vnode.h> #include <netinet/in.h> #include <netinet/tcp.h> diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c index 7f8be03..d5e8972 100644 --- a/sys/nfs/nfs_vfsops.c +++ b/sys/nfs/nfs_vfsops.c @@ -40,17 +40,18 @@ #include "opt_bootp.h" #include <sys/param.h> -#include <sys/sockio.h> -#include <sys/proc.h> -#include <sys/vnode.h> +#include <sys/systm.h> #include <sys/kernel.h> -#include <sys/sysctl.h> +#include <sys/lock.h> #include <sys/malloc.h> -#include <sys/mount.h> #include <sys/mbuf.h> +#include <sys/mount.h> +#include <sys/proc.h> #include <sys/socket.h> #include <sys/socketvar.h> -#include <sys/systm.h> +#include <sys/sockio.h> +#include <sys/sysctl.h> +#include <sys/vnode.h> #include <vm/vm.h> #include <vm/vm_extern.h> diff --git a/sys/nfsclient/nfs_lock.c b/sys/nfsclient/nfs_lock.c index aaac361..9fd243a 100644 --- a/sys/nfsclient/nfs_lock.c +++ b/sys/nfsclient/nfs_lock.c @@ -32,17 +32,19 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/fcntl.h> +#include <sys/kernel.h> /* for hz */ +#include <sys/lock.h> #include <sys/malloc.h> +#include <sys/lockf.h> /* for hz */ /* Must come after sys/malloc.h */ #include <sys/mbuf.h> #include <sys/mount.h> #include <sys/namei.h> #include <sys/proc.h> +#include <sys/resourcevar.h> +#include <sys/socket.h> #include <sys/socket.h> #include <sys/unistd.h> #include <sys/vnode.h> -#include <sys/resourcevar.h> -#include <sys/kernel.h> /* for hz */ -#include <sys/lockf.h> /* for hz */ #include <net/if.h> diff --git a/sys/nfsclient/nfs_node.c b/sys/nfsclient/nfs_node.c index 0191b66..dc21bc3 100644 --- a/sys/nfsclient/nfs_node.c +++ b/sys/nfsclient/nfs_node.c @@ -40,12 +40,15 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/fnv_hash.h> +#include <sys/lock.h> +#include <sys/malloc.h> #include <sys/mount.h> #include <sys/namei.h> -#include <sys/vnode.h> -#include <sys/malloc.h> -#include <sys/fnv_hash.h> +#include <sys/proc.h> +#include <sys/socket.h> #include <sys/sysctl.h> +#include <sys/vnode.h> #include <vm/vm_zone.h> diff --git a/sys/nfsclient/nfs_socket.c b/sys/nfsclient/nfs_socket.c index fefeea8..5772e4b 100644 --- a/sys/nfsclient/nfs_socket.c +++ b/sys/nfsclient/nfs_socket.c @@ -43,18 +43,20 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/proc.h> -#include <sys/malloc.h> -#include <sys/mount.h> #include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/malloc.h> #include <sys/mbuf.h> -#include <sys/vnode.h> +#include <sys/mount.h> +#include <sys/mutex.h> +#include <sys/proc.h> #include <sys/protosw.h> +#include <sys/signalvar.h> #include <sys/socket.h> #include <sys/socketvar.h> -#include <sys/syslog.h> #include <sys/sysctl.h> -#include <sys/signalvar.h> +#include <sys/syslog.h> +#include <sys/vnode.h> #include <netinet/in.h> #include <netinet/tcp.h> diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index 7f8be03..d5e8972 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -40,17 +40,18 @@ #include "opt_bootp.h" #include <sys/param.h> -#include <sys/sockio.h> -#include <sys/proc.h> -#include <sys/vnode.h> +#include <sys/systm.h> #include <sys/kernel.h> -#include <sys/sysctl.h> +#include <sys/lock.h> #include <sys/malloc.h> -#include <sys/mount.h> #include <sys/mbuf.h> +#include <sys/mount.h> +#include <sys/proc.h> #include <sys/socket.h> #include <sys/socketvar.h> -#include <sys/systm.h> +#include <sys/sockio.h> +#include <sys/sysctl.h> +#include <sys/vnode.h> #include <vm/vm.h> #include <vm/vm_extern.h> diff --git a/sys/nfsserver/nfs_srvsock.c b/sys/nfsserver/nfs_srvsock.c index fefeea8..5772e4b 100644 --- a/sys/nfsserver/nfs_srvsock.c +++ b/sys/nfsserver/nfs_srvsock.c @@ -43,18 +43,20 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/proc.h> -#include <sys/malloc.h> -#include <sys/mount.h> #include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/malloc.h> #include <sys/mbuf.h> -#include <sys/vnode.h> +#include <sys/mount.h> +#include <sys/mutex.h> +#include <sys/proc.h> #include <sys/protosw.h> +#include <sys/signalvar.h> #include <sys/socket.h> #include <sys/socketvar.h> -#include <sys/syslog.h> #include <sys/sysctl.h> -#include <sys/signalvar.h> +#include <sys/syslog.h> +#include <sys/vnode.h> #include <netinet/in.h> #include <netinet/tcp.h> diff --git a/sys/nwfs/nwfs_node.c b/sys/nwfs/nwfs_node.c index 3ba41a8..9c1f086 100644 --- a/sys/nwfs/nwfs_node.c +++ b/sys/nwfs/nwfs_node.c @@ -34,17 +34,20 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> -#include <sys/time.h> -#include <sys/proc.h> -#include <sys/mount.h> -#include <sys/vnode.h> +#include <sys/lock.h> #include <sys/malloc.h> +#include <sys/mount.h> +#include <sys/mutex.h> +#include <sys/proc.h> +#include <sys/queue.h> #include <sys/sysctl.h> +#include <sys/time.h> +#include <sys/vnode.h> + #include <vm/vm.h> #include <vm/vm_extern.h> #include <vm/vm_page.h> #include <vm/vm_object.h> -#include <sys/queue.h> #include <netncp/ncp.h> #include <netncp/ncp_conn.h> diff --git a/sys/pc98/pc98/syscons.c b/sys/pc98/pc98/syscons.c index a5f73d6..6d6095d 100644 --- a/sys/pc98/pc98/syscons.c +++ b/sys/pc98/pc98/syscons.c @@ -37,20 +37,22 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/eventhandler.h> -#include <sys/reboot.h> #include <sys/conf.h> -#include <sys/proc.h> -#include <sys/signalvar.h> -#include <sys/sysctl.h> -#include <sys/tty.h> -#include <sys/kernel.h> -#include <sys/malloc.h> #include <sys/cons.h> -#include <sys/random.h> #include <sys/consio.h> +#include <sys/eventhandler.h> #include <sys/fbio.h> #include <sys/kbio.h> +#include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/malloc.h> +#include <sys/mutex.h> +#include <sys/proc.h> +#include <sys/random.h> +#include <sys/reboot.h> +#include <sys/signalvar.h> +#include <sys/sysctl.h> +#include <sys/tty.h> #include <machine/clock.h> #include <machine/psl.h> diff --git a/sys/posix4/ksched.c b/sys/posix4/ksched.c index dbdc174..c7f746a 100644 --- a/sys/posix4/ksched.c +++ b/sys/posix4/ksched.c @@ -37,8 +37,9 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/proc.h> +#include <sys/lock.h> #include <sys/mutex.h> +#include <sys/proc.h> #include <sys/resource.h> #include <posix4/posix4.h> diff --git a/sys/posix4/p1003_1b.c b/sys/posix4/p1003_1b.c index 0d1fd0e..577456f 100644 --- a/sys/posix4/p1003_1b.c +++ b/sys/posix4/p1003_1b.c @@ -38,12 +38,14 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> -#include <sys/sysent.h> +#include <sys/lock.h> +#include <sys/module.h> +#include <sys/mutex.h> #include <sys/proc.h> +#include <sys/sysctl.h> +#include <sys/sysent.h> #include <sys/syslog.h> -#include <sys/module.h> #include <sys/sysproto.h> -#include <sys/sysctl.h> #include <posix4/posix4.h> diff --git a/sys/powerpc/powerpc/procfs_machdep.c b/sys/powerpc/powerpc/procfs_machdep.c index c0766ca..e18353a 100644 --- a/sys/powerpc/powerpc/procfs_machdep.c +++ b/sys/powerpc/powerpc/procfs_machdep.c @@ -66,20 +66,21 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/ptrace.h> +#include <sys/user.h> #include <sys/vnode.h> -#include <machine/reg.h> + #include <machine/md_var.h> +#include <machine/reg.h> #include <miscfs/procfs/procfs.h> #include <vm/vm.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> -#include <sys/user.h> - int procfs_read_regs(p, regs) struct proc *p; diff --git a/sys/sys/_lock.h b/sys/sys/_lock.h new file mode 100644 index 0000000..646ad21 --- /dev/null +++ b/sys/sys/_lock.h @@ -0,0 +1,44 @@ +/*- + * Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Berkeley Software Design Inc's name may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN INC ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL BERKELEY SOFTWARE DESIGN INC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS_LOCK_TYPES_H_ +#define _SYS_LOCK_TYPES_H_ + +struct lock_object { + struct lock_class *lo_class; + const char *lo_name; + const char *lo_file; /* File and line of last acquire. */ + int lo_line; + u_int lo_flags; + STAILQ_ENTRY(lock_object) lo_list; /* List of all locks in system. */ + struct witness *lo_witness; +}; + +#endif /* !_SYS_LOCK_TYPES_H_ */ diff --git a/sys/sys/_mutex.h b/sys/sys/_mutex.h new file mode 100644 index 0000000..4f0a951 --- /dev/null +++ b/sys/sys/_mutex.h @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Berkeley Software Design Inc's name may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN INC ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL BERKELEY SOFTWARE DESIGN INC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS_MUTEX_TYPES_H_ +#define _SYS_MUTEX_TYPES_H_ + +/* + * Sleep/spin mutex + */ + +struct mtx { + struct lock_object mtx_object; /* Common lock properties. */ + volatile uintptr_t mtx_lock; /* owner (and state for sleep locks) */ + volatile u_int mtx_recurse; /* number of recursive holds */ + critical_t mtx_savecrit; /* saved flags (for spin locks) */ + TAILQ_HEAD(, proc) mtx_blocked; /* threads blocked on this lock */ + LIST_ENTRY(mtx) mtx_contested; /* list of all contested locks */ +}; + +#endif /* !_SYS_MUTEX_TYPES_H_ */ diff --git a/sys/sys/buf.h b/sys/sys/buf.h index ebcf9d2..5a449ac4 100644 --- a/sys/sys/buf.h +++ b/sys/sys/buf.h @@ -44,6 +44,7 @@ #include <sys/queue.h> #include <sys/lock.h> +#include <sys/lockmgr.h> struct bio; struct buf; diff --git a/sys/sys/conf.h b/sys/sys/conf.h index 4d23ac4..55959f6 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -44,7 +44,6 @@ #ifndef _SYS_CONF_H_ #define _SYS_CONF_H_ -#include <sys/queue.h> #include <sys/eventhandler.h> struct tty; diff --git a/sys/sys/eventhandler.h b/sys/sys/eventhandler.h index 1c011e2..5effcda 100644 --- a/sys/sys/eventhandler.h +++ b/sys/sys/eventhandler.h @@ -29,8 +29,15 @@ #ifndef SYS_EVENTHANDLER_H #define SYS_EVENTHANDLER_H +/* + * XXX - compatability until lockmgr() goes away or all the #includes are + * updated. + */ +#include <sys/lockmgr.h> + #include <sys/queue.h> -#include <sys/lock.h> +#include <sys/_lock.h> +#include <sys/_mutex.h> struct eventhandler_entry { diff --git a/sys/sys/linedisc.h b/sys/sys/linedisc.h index 4d23ac4..55959f6 100644 --- a/sys/sys/linedisc.h +++ b/sys/sys/linedisc.h @@ -44,7 +44,6 @@ #ifndef _SYS_CONF_H_ #define _SYS_CONF_H_ -#include <sys/queue.h> #include <sys/eventhandler.h> struct tty; diff --git a/sys/sys/lock.h b/sys/sys/lock.h index ca3404b..a63e3f5 100644 --- a/sys/sys/lock.h +++ b/sys/sys/lock.h @@ -39,6 +39,7 @@ #include <sys/lockmgr.h> #include <sys/queue.h> +#include <sys/_lock.h> /* * Lock classes. Each lock has a class which describes characteristics @@ -60,18 +61,6 @@ struct lock_class { #define LC_SLEEPABLE 0x00000004 /* Sleeping allowed with this lock. */ #define LC_RECURSABLE 0x00000008 /* Locks of this type may recurse. */ -struct witness; - -struct lock_object { - struct lock_class *lo_class; - const char *lo_name; - const char *lo_file; /* File and line of last acquire. */ - int lo_line; - u_int lo_flags; - STAILQ_ENTRY(lock_object) lo_list; /* List of all locks in system. */ - struct witness *lo_witness; -}; - #define LO_CLASSFLAGS 0x0000ffff /* Class specific flags. */ #define LO_INITIALIZED 0x00010000 /* Lock has been initialized. */ #define LO_WITNESS 0x00020000 /* Should witness monitor this lock. */ diff --git a/sys/sys/lockmgr.h b/sys/sys/lockmgr.h index 80f8764..477ef50 100644 --- a/sys/sys/lockmgr.h +++ b/sys/sys/lockmgr.h @@ -38,8 +38,8 @@ * $FreeBSD$ */ -#ifndef _LOCK_H_ -#define _LOCK_H_ +#ifndef _SYS_LOCKMGR_H_ +#define _SYS_LOCKMGR_H_ struct mtx; @@ -219,4 +219,4 @@ void lockmgr_printinfo __P((struct lock *)); int lockstatus __P((struct lock *, struct proc *)); int lockcount __P((struct lock *)); -#endif /* !_LOCK_H_ */ +#endif /* !_SYS_LOCKMGR_H_ */ diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index f904ade..de7a3c9 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -39,8 +39,8 @@ #ifdef _KERNEL #include <sys/condvar.h> /* XXX */ -#include <sys/lock.h> /* XXX */ -#include <sys/mutex.h> /* XXX */ +#include <sys/_lock.h> +#include <sys/_mutex.h> #endif /* _KERNEL */ /* diff --git a/sys/sys/mount.h b/sys/sys/mount.h index aef5ac5..0ffa243 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -37,10 +37,17 @@ #ifndef _SYS_MOUNT_H_ #define _SYS_MOUNT_H_ +/* + * XXX - compatability until lockmgr() goes away or all the #includes are + * updated. + */ +#include <sys/lockmgr.h> + #include <sys/ucred.h> #include <sys/queue.h> #ifdef _KERNEL -#include <sys/lock.h> +#include <sys/_lock.h> +#include <sys/_mutex.h> #endif struct netcred; diff --git a/sys/sys/mutex.h b/sys/sys/mutex.h index 7a893a2..91ec080 100644 --- a/sys/sys/mutex.h +++ b/sys/sys/mutex.h @@ -34,6 +34,8 @@ #ifndef LOCORE #include <sys/queue.h> +#include <sys/_lock.h> +#include <sys/_mutex.h> #ifdef _KERNEL #include <sys/ktr.h> @@ -78,21 +80,6 @@ #ifndef LOCORE /* - * Sleep/spin mutex - */ - -struct lock_object; - -struct mtx { - struct lock_object mtx_object; /* Common lock properties. */ - volatile uintptr_t mtx_lock; /* owner (and state for sleep locks) */ - volatile u_int mtx_recurse; /* number of recursive holds */ - critical_t mtx_savecrit; /* saved flags (for spin locks) */ - TAILQ_HEAD(, proc) mtx_blocked; /* threads blocked on this lock */ - LIST_ENTRY(mtx) mtx_contested; /* list of all contested locks */ -}; - -/* * XXX: Friendly reminder to fix things in MP code that is presently being * XXX: worked on. */ diff --git a/sys/sys/resourcevar.h b/sys/sys/resourcevar.h index 598c806..a610e2f 100644 --- a/sys/sys/resourcevar.h +++ b/sys/sys/resourcevar.h @@ -39,8 +39,10 @@ #include <sys/resource.h> #include <sys/queue.h> -#include <sys/lock.h> /* XXX */ -#include <sys/mutex.h> /* XXX */ +#ifdef _KERNEL +#include <sys/_lock.h> +#include <sys/_mutex.h> +#endif /* * Kernel per-process accounting / statistics diff --git a/sys/sys/sx.h b/sys/sys/sx.h index 3b4114d..c3c62b3 100644 --- a/sys/sys/sx.h +++ b/sys/sys/sx.h @@ -31,12 +31,9 @@ #define _SYS_SX_H_ #ifndef LOCORE -#include <sys/lock.h> /* XXX */ -#include <sys/mutex.h> /* XXX */ +#include <sys/_mutex.h> #include <sys/condvar.h> /* XXX */ -struct lock_object; - struct sx { struct lock_object sx_object; /* Common lock properties. */ struct mtx sx_lock; /* General protection lock. */ diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index 9596dd6..c48df00 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -37,8 +37,9 @@ #ifndef _SYS_UCRED_H_ #define _SYS_UCRED_H_ -#include <sys/lock.h> /* XXX */ -#include <sys/mutex.h> /* XXX */ +#include <sys/queue.h> +#include <sys/_lock.h> +#include <sys/_mutex.h> /* * Credentials. diff --git a/sys/sys/user.h b/sys/sys/user.h index fab30c3..153ed2d 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -45,8 +45,8 @@ #include <sys/resource.h> #include <sys/ucred.h> #include <sys/uio.h> -#include <sys/lock.h> /* XXX */ -#include <sys/mutex.h> /* XXX */ +#include <sys/_mutex.h> +#include <sys/_lock.h> #include <sys/proc.h> #include <vm/vm.h> /* XXX */ #include <vm/vm_param.h> /* XXX */ diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 6c09a11..e40f800 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -37,9 +37,15 @@ #ifndef _SYS_VNODE_H_ #define _SYS_VNODE_H_ -#include <sys/lock.h> -#include <sys/mutex.h> +/* + * XXX - compatability until lockmgr() goes away or all the #includes are + * updated. + */ +#include <sys/lockmgr.h> + #include <sys/queue.h> +#include <sys/_lock.h> +#include <sys/_mutex.h> #include <sys/selinfo.h> #include <sys/uio.h> #include <sys/acl.h> diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c index f419f01..1b76759 100644 --- a/sys/ufs/ufs/ufs_quota.c +++ b/sys/ufs/ufs/ufs_quota.c @@ -39,13 +39,16 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/fcntl.h> #include <sys/kernel.h> -#include <sys/namei.h> +#include <sys/lock.h> #include <sys/malloc.h> -#include <sys/fcntl.h> +#include <sys/mount.h> +#include <sys/mutex.h> +#include <sys/namei.h> #include <sys/proc.h> +#include <sys/socket.h> #include <sys/vnode.h> -#include <sys/mount.h> #include <ufs/ufs/extattr.h> #include <ufs/ufs/quota.h> diff --git a/sys/ufs/ufs/ufs_vfsops.c b/sys/ufs/ufs/ufs_vfsops.c index 033f9dd..1369465 100644 --- a/sys/ufs/ufs/ufs_vfsops.c +++ b/sys/ufs/ufs/ufs_vfsops.c @@ -42,11 +42,13 @@ #include "opt_quota.h" #include <sys/param.h> -#include <sys/kernel.h> #include <sys/systm.h> -#include <sys/proc.h> -#include <sys/mount.h> +#include <sys/kernel.h> +#include <sys/lock.h> #include <sys/malloc.h> +#include <sys/mount.h> +#include <sys/proc.h> +#include <sys/socket.h> #include <sys/vnode.h> #include <ufs/ufs/extattr.h> diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c index 7d7480c..86f88a3 100644 --- a/sys/vm/device_pager.c +++ b/sys/vm/device_pager.c @@ -42,6 +42,8 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/conf.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/mman.h> #include <sys/sx.h> diff --git a/sys/vm/phys_pager.c b/sys/vm/phys_pager.c index 5a6aca5..1f00ea0 100644 --- a/sys/vm/phys_pager.c +++ b/sys/vm/phys_pager.c @@ -30,6 +30,8 @@ #include <sys/linker_set.h> #include <sys/conf.h> #include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/mman.h> #include <sys/sysctl.h> #include <sys/sx.h> diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 48120ee..a1bad69 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -75,6 +75,8 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/vnode.h> #include <sys/resourcevar.h> @@ -82,7 +84,6 @@ #include <vm/vm.h> #include <vm/vm_param.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> #include <vm/vm_object.h> diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index 4f5d9c0..87b13de 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -67,6 +67,8 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/resourcevar.h> #include <sys/shm.h> @@ -76,14 +78,12 @@ #include <sys/kernel.h> #include <sys/ktr.h> -#include <sys/mutex.h> #include <sys/unistd.h> #include <machine/limits.h> #include <vm/vm.h> #include <vm/vm_param.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> #include <vm/vm_page.h> diff --git a/sys/vm/vm_init.c b/sys/vm/vm_init.c index c46d37c..ae336e1 100644 --- a/sys/vm/vm_init.c +++ b/sys/vm/vm_init.c @@ -70,10 +70,11 @@ #include <sys/param.h> #include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/proc.h> #include <sys/systm.h> #include <vm/vm.h> -#include <sys/lock.h> #include <vm/vm_object.h> #include <vm/vm_page.h> #include <vm/vm_map.h> diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c index 08da921..14e4867 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -70,12 +70,13 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/malloc.h> #include <vm/vm.h> #include <vm/vm_param.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> #include <vm/vm_object.h> diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index cca1067..b33e9e4 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -70,6 +70,8 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/vmmeter.h> #include <sys/mman.h> @@ -78,7 +80,6 @@ #include <vm/vm.h> #include <vm/vm_param.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> #include <vm/vm_page.h> diff --git a/sys/vm/vm_meter.c b/sys/vm/vm_meter.c index 4f42ee0..5f35e63 100644 --- a/sys/vm/vm_meter.c +++ b/sys/vm/vm_meter.c @@ -35,9 +35,11 @@ */ #include <sys/param.h> -#include <sys/proc.h> #include <sys/systm.h> #include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/mutex.h> +#include <sys/proc.h> #include <sys/resource.h> #include <sys/sx.h> #include <sys/vmmeter.h> @@ -46,7 +48,6 @@ #include <vm/vm_page.h> #include <vm/vm_extern.h> #include <vm/vm_param.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> #include <vm/vm_object.h> diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 6328ff7..14307b3 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -49,8 +49,9 @@ #include "opt_rlimit.h" #include <sys/param.h> -#include <sys/kernel.h> #include <sys/systm.h> +#include <sys/kernel.h> +#include <sys/lock.h> #include <sys/sysproto.h> #include <sys/filedesc.h> #include <sys/proc.h> @@ -65,7 +66,6 @@ #include <vm/vm.h> #include <vm/vm_param.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> #include <vm/vm_object.h> diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index cc205a8..33fe834 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -70,12 +70,14 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/proc.h> /* for curproc, pageproc */ -#include <sys/vnode.h> -#include <sys/vmmeter.h> +#include <sys/lock.h> #include <sys/mman.h> #include <sys/mount.h> #include <sys/mutex.h> +#include <sys/proc.h> /* for curproc, pageproc */ +#include <sys/socket.h> +#include <sys/vnode.h> +#include <sys/vmmeter.h> #include <sys/sx.h> #include <vm/vm.h> diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index e332564..5865d70 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -70,6 +70,7 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/lock.h> #include <sys/malloc.h> #include <sys/proc.h> #include <sys/vmmeter.h> @@ -77,7 +78,6 @@ #include <vm/vm.h> #include <vm/vm_param.h> -#include <sys/lock.h> #include <vm/vm_kern.h> #include <vm/vm_object.h> #include <vm/vm_page.h> diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index e61dcc1..a7856dd 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -76,6 +76,8 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/kthread.h> #include <sys/ktr.h> @@ -88,7 +90,6 @@ #include <vm/vm.h> #include <vm/vm_param.h> -#include <sys/lock.h> #include <vm/vm_object.h> #include <vm/vm_page.h> #include <vm/vm_map.h> diff --git a/sys/vm/vm_unix.c b/sys/vm/vm_unix.c index bea87f0..f9b24f8 100644 --- a/sys/vm/vm_unix.c +++ b/sys/vm/vm_unix.c @@ -45,13 +45,13 @@ * Traditional sbrk/grow interface to VM */ #include <sys/param.h> +#include <sys/lock.h> #include <sys/sysproto.h> #include <sys/proc.h> #include <sys/resourcevar.h> #include <vm/vm.h> #include <vm/vm_param.h> -#include <sys/lock.h> #include <vm/pmap.h> #include <vm/vm_map.h> diff --git a/sys/vm/vm_zone.h b/sys/vm/vm_zone.h index 8cb5b8e..9b41d0b 100644 --- a/sys/vm/vm_zone.h +++ b/sys/vm/vm_zone.h @@ -21,8 +21,8 @@ #define ZONE_INTERRUPT 1 /* Use this if you need to allocate at int time */ #define ZONE_BOOT 16 /* This is an internal flag used by zbootinit */ -#include <sys/lock.h> /* XXX */ -#include <sys/mutex.h> +#include <sys/_lock.h> +#include <sys/_mutex.h> typedef struct vm_zone { struct mtx zmtx; /* lock for data structure */ |