summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2001-05-01 08:13:21 +0000
committermarkm <markm@FreeBSD.org>2001-05-01 08:13:21 +0000
commitbcca5847d5e7a197302d7689cd358f5ce6316d0a (patch)
treea1f5dea8640fa8bdeebec40477b6fdcf33b3e51b /sys/kern
parent7d3d350edce373e3ec1e8e7fe7d94bb08d031a24 (diff)
downloadFreeBSD-src-bcca5847d5e7a197302d7689cd358f5ce6316d0a.zip
FreeBSD-src-bcca5847d5e7a197302d7689cd358f5ce6316d0a.tar.gz
Undo part of the tangle of having sys/lock.h and sys/mutex.h included in
other "system" header files. Also help the deprecation of lockmgr.h by making it a sub-include of sys/lock.h and removing sys/lockmgr.h form kernel .c files. Sort sys/*.h includes where possible in affected files. OK'ed by: bde (with reservations)
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/imgact_aout.c8
-rw-r--r--sys/kern/imgact_gzip.c3
-rw-r--r--sys/kern/kern_acct.c2
-rw-r--r--sys/kern/kern_condvar.c3
-rw-r--r--sys/kern/kern_descrip.c2
-rw-r--r--sys/kern/kern_event.c2
-rw-r--r--sys/kern/kern_exec.c4
-rw-r--r--sys/kern/kern_idle.c5
-rw-r--r--sys/kern/kern_ktrace.c3
-rw-r--r--sys/kern/kern_lockf.c1
-rw-r--r--sys/kern/kern_malloc.c2
-rw-r--r--sys/kern/kern_mutex.c2
-rw-r--r--sys/kern/kern_proc.c10
-rw-r--r--sys/kern/kern_prot.c5
-rw-r--r--sys/kern/kern_subr.c4
-rw-r--r--sys/kern/kern_time.c3
-rw-r--r--sys/kern/ksched.c3
-rw-r--r--sys/kern/link_elf.c6
-rw-r--r--sys/kern/link_elf_obj.c6
-rw-r--r--sys/kern/p1003_1b.c8
-rw-r--r--sys/kern/subr_eventhandler.c1
-rw-r--r--sys/kern/subr_prof.c2
-rw-r--r--sys/kern/subr_turnstile.c2
-rw-r--r--sys/kern/sys_pipe.c4
-rw-r--r--sys/kern/sys_process.c6
-rw-r--r--sys/kern/sysv_shm.c4
-rw-r--r--sys/kern/tty.c3
-rw-r--r--sys/kern/tty_tty.c2
-rw-r--r--sys/kern/uipc_mbuf.c6
-rw-r--r--sys/kern/uipc_mbuf2.c2
-rw-r--r--sys/kern/uipc_sockbuf.c4
-rw-r--r--sys/kern/uipc_socket.c3
-rw-r--r--sys/kern/uipc_socket2.c4
-rw-r--r--sys/kern/uipc_syscalls.c7
-rw-r--r--sys/kern/uipc_usrreq.c6
-rw-r--r--sys/kern/vfs_cache.c1
-rw-r--r--sys/kern/vfs_conf.c9
-rw-r--r--sys/kern/vfs_lookup.c2
-rw-r--r--sys/kern/vfs_mount.c9
39 files changed, 109 insertions, 50 deletions
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"
OpenPOWER on IntegriCloud