aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2001-03-28 09:17:56 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2001-03-28 09:17:56 +0000
commitf34fa851e0b97ea3637d73827346927014e1b137 (patch)
tree2cd0230eaac847e88811b3c23c3cf39fd199008b /sys
parent5e980e229f3ed52731211607e437b2f6759ab71a (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/alpha/alpha/busdma_machdep.c1
-rw-r--r--sys/amd64/amd64/tsc.c4
-rw-r--r--sys/amd64/isa/clock.c4
-rw-r--r--sys/cam/cam_periph.c2
-rw-r--r--sys/ddb/db_ps.c2
-rw-r--r--sys/dev/acpica/Osd/OsdSynch.c1
-rw-r--r--sys/dev/acpica/acpi.c1
-rw-r--r--sys/dev/acpica/acpi_lid.c2
-rw-r--r--sys/dev/an/if_an_pccard.c1
-rw-r--r--sys/dev/dc/dcphy.c1
-rw-r--r--sys/dev/dc/pnphy.c1
-rw-r--r--sys/dev/ichsmb/ichsmb.c1
-rw-r--r--sys/dev/ichsmb/ichsmb_pci.c1
-rw-r--r--sys/dev/isp/isp_freebsd.h1
-rw-r--r--sys/dev/mii/dcphy.c1
-rw-r--r--sys/dev/mii/pnphy.c1
-rw-r--r--sys/dev/random/harvest.c1
-rw-r--r--sys/dev/random/yarrow.c1
-rw-r--r--sys/fs/procfs/procfs_dbregs.c1
-rw-r--r--sys/fs/procfs/procfs_fpregs.c1
-rw-r--r--sys/fs/procfs/procfs_regs.c1
-rw-r--r--sys/i386/i386/procfs_machdep.c1
-rw-r--r--sys/i386/i386/tsc.c4
-rw-r--r--sys/i386/isa/clock.c4
-rw-r--r--sys/isa/atrtc.c4
-rw-r--r--sys/kern/imgact_elf.c1
-rw-r--r--sys/kern/kern_clock.c2
-rw-r--r--sys/kern/kern_exit.c2
-rw-r--r--sys/kern/kern_intr.c1
-rw-r--r--sys/kern/kern_resource.c4
-rw-r--r--sys/kern/kern_switch.c1
-rw-r--r--sys/kern/kern_timeout.c1
-rw-r--r--sys/kern/subr_eventhandler.c1
-rw-r--r--sys/miscfs/procfs/procfs_dbregs.c1
-rw-r--r--sys/miscfs/procfs/procfs_fpregs.c1
-rw-r--r--sys/miscfs/procfs/procfs_regs.c1
-rw-r--r--sys/net/if_var.h4
-rw-r--r--sys/netgraph/netgraph.h1
-rw-r--r--sys/sys/mbuf.h1
-rw-r--r--sys/sys/resourcevar.h1
-rw-r--r--sys/sys/ucred.h3
-rw-r--r--sys/sys/user.h3
-rw-r--r--sys/vm/vm_zone.h1
43 files changed, 51 insertions, 22 deletions
diff --git a/sys/alpha/alpha/busdma_machdep.c b/sys/alpha/alpha/busdma_machdep.c
index d87cf99814d2..bed5e8a9290a 100644
--- a/sys/alpha/alpha/busdma_machdep.c
+++ b/sys/alpha/alpha/busdma_machdep.c
@@ -30,6 +30,7 @@
#include <sys/bus.h>
#include <sys/systm.h>
#include <sys/interrupt.h>
+#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mutex.h>
diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c
index 7d8edac1a0ef..9034f8146195 100644
--- a/sys/amd64/amd64/tsc.c
+++ b/sys/amd64/amd64/tsc.c
@@ -56,14 +56,12 @@
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/ipl.h>
+#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/time.h>
#include <sys/timetc.h>
#include <sys/kernel.h>
-#ifndef SMP
-#include <sys/lock.h>
-#endif
#include <sys/sysctl.h>
#include <sys/cons.h>
diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c
index 7d8edac1a0ef..9034f8146195 100644
--- a/sys/amd64/isa/clock.c
+++ b/sys/amd64/isa/clock.c
@@ -56,14 +56,12 @@
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/ipl.h>
+#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/time.h>
#include <sys/timetc.h>
#include <sys/kernel.h>
-#ifndef SMP
-#include <sys/lock.h>
-#endif
#include <sys/sysctl.h>
#include <sys/cons.h>
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c
index ee6eace58326..2286a51bed70 100644
--- a/sys/cam/cam_periph.c
+++ b/sys/cam/cam_periph.c
@@ -35,6 +35,8 @@
#include <sys/malloc.h>
#include <sys/linker_set.h>
#include <sys/bio.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
#include <sys/buf.h>
#include <sys/proc.h>
#include <sys/devicestat.h>
diff --git a/sys/ddb/db_ps.c b/sys/ddb/db_ps.c
index 321621e1a630..bccda5a360c6 100644
--- a/sys/ddb/db_ps.c
+++ b/sys/ddb/db_ps.c
@@ -34,6 +34,8 @@
*/
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/cons.h>
diff --git a/sys/dev/acpica/Osd/OsdSynch.c b/sys/dev/acpica/Osd/OsdSynch.c
index dacfc5c7a2b8..84773dee1ff5 100644
--- a/sys/dev/acpica/Osd/OsdSynch.c
+++ b/sys/dev/acpica/Osd/OsdSynch.c
@@ -34,6 +34,7 @@
#include "acpi.h"
#include <sys/kernel.h>
+#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mutex.h>
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 7583acda007b..c2905e057c5a 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/lock.h>
#include <sys/malloc.h>
#include <sys/mutex.h>
#include <sys/bus.h>
diff --git a/sys/dev/acpica/acpi_lid.c b/sys/dev/acpica/acpi_lid.c
index f80a04f04605..551ec181ea9a 100644
--- a/sys/dev/acpica/acpi_lid.c
+++ b/sys/dev/acpica/acpi_lid.c
@@ -33,7 +33,9 @@
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/bus.h>
+#include <sys/lock.h>
#include <sys/mutex.h>
+#include <sys/proc.h>
#include "acpi.h"
diff --git a/sys/dev/an/if_an_pccard.c b/sys/dev/an/if_an_pccard.c
index 41b667267589..ebb78036271a 100644
--- a/sys/dev/an/if_an_pccard.c
+++ b/sys/dev/an/if_an_pccard.c
@@ -55,6 +55,7 @@
#include <sys/bus.h>
#include <machine/bus.h>
#include <sys/rman.h>
+#include <sys/lock.h>
#include <sys/mutex.h>
#include <machine/resource.h>
diff --git a/sys/dev/dc/dcphy.c b/sys/dev/dc/dcphy.c
index e991f0071c1a..e2d30b9d6a4c 100644
--- a/sys/dev/dc/dcphy.c
+++ b/sys/dev/dc/dcphy.c
@@ -46,6 +46,7 @@
#include <sys/kernel.h>
#include <sys/socket.h>
#include <sys/errno.h>
+#include <sys/lock.h>
#include <sys/module.h>
#include <sys/mutex.h>
#include <sys/bus.h>
diff --git a/sys/dev/dc/pnphy.c b/sys/dev/dc/pnphy.c
index 786be7ce10ad..e91ffc67707b 100644
--- a/sys/dev/dc/pnphy.c
+++ b/sys/dev/dc/pnphy.c
@@ -44,6 +44,7 @@
#include <sys/kernel.h>
#include <sys/socket.h>
#include <sys/errno.h>
+#include <sys/lock.h>
#include <sys/module.h>
#include <sys/mutex.h>
#include <sys/bus.h>
diff --git a/sys/dev/ichsmb/ichsmb.c b/sys/dev/ichsmb/ichsmb.c
index 71b9b7a69b76..c17f09abf2a5 100644
--- a/sys/dev/ichsmb/ichsmb.c
+++ b/sys/dev/ichsmb/ichsmb.c
@@ -51,6 +51,7 @@
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/errno.h>
+#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/syslog.h>
#include <sys/bus.h>
diff --git a/sys/dev/ichsmb/ichsmb_pci.c b/sys/dev/ichsmb/ichsmb_pci.c
index 24c4423e8a1d..cc39b8ce372c 100644
--- a/sys/dev/ichsmb/ichsmb_pci.c
+++ b/sys/dev/ichsmb/ichsmb_pci.c
@@ -48,6 +48,7 @@
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/errno.h>
+#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/syslog.h>
#include <sys/bus.h>
diff --git a/sys/dev/isp/isp_freebsd.h b/sys/dev/isp/isp_freebsd.h
index e29c55b33aa2..106b65d7676b 100644
--- a/sys/dev/isp/isp_freebsd.h
+++ b/sys/dev/isp/isp_freebsd.h
@@ -45,6 +45,7 @@
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/queue.h>
+#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mutex.h>
#include <sys/proc.h>
diff --git a/sys/dev/mii/dcphy.c b/sys/dev/mii/dcphy.c
index e991f0071c1a..e2d30b9d6a4c 100644
--- a/sys/dev/mii/dcphy.c
+++ b/sys/dev/mii/dcphy.c
@@ -46,6 +46,7 @@
#include <sys/kernel.h>
#include <sys/socket.h>
#include <sys/errno.h>
+#include <sys/lock.h>
#include <sys/module.h>
#include <sys/mutex.h>
#include <sys/bus.h>
diff --git a/sys/dev/mii/pnphy.c b/sys/dev/mii/pnphy.c
index 786be7ce10ad..e91ffc67707b 100644
--- a/sys/dev/mii/pnphy.c
+++ b/sys/dev/mii/pnphy.c
@@ -44,6 +44,7 @@
#include <sys/kernel.h>
#include <sys/socket.h>
#include <sys/errno.h>
+#include <sys/lock.h>
#include <sys/module.h>
#include <sys/mutex.h>
#include <sys/bus.h>
diff --git a/sys/dev/random/harvest.c b/sys/dev/random/harvest.c
index bb6be3c8dc35..4573232134c4 100644
--- a/sys/dev/random/harvest.c
+++ b/sys/dev/random/harvest.c
@@ -31,6 +31,7 @@
#include <sys/types.h>
#include <sys/queue.h>
#include <sys/kthread.h>
+#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/poll.h>
#include <sys/selinfo.h>
diff --git a/sys/dev/random/yarrow.c b/sys/dev/random/yarrow.c
index 4e3f1743b83e..343ca9ab6f6f 100644
--- a/sys/dev/random/yarrow.c
+++ b/sys/dev/random/yarrow.c
@@ -30,6 +30,7 @@
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/libkern.h>
+#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/selinfo.h>
#include <sys/random.h>
diff --git a/sys/fs/procfs/procfs_dbregs.c b/sys/fs/procfs/procfs_dbregs.c
index 6d35da0fefda..c21597fdb437 100644
--- a/sys/fs/procfs/procfs_dbregs.c
+++ b/sys/fs/procfs/procfs_dbregs.c
@@ -46,6 +46,7 @@
#include <sys/param.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>
diff --git a/sys/fs/procfs/procfs_fpregs.c b/sys/fs/procfs/procfs_fpregs.c
index 493939ca5457..49853c48fc7f 100644
--- a/sys/fs/procfs/procfs_fpregs.c
+++ b/sys/fs/procfs/procfs_fpregs.c
@@ -43,6 +43,7 @@
#include <sys/param.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>
diff --git a/sys/fs/procfs/procfs_regs.c b/sys/fs/procfs/procfs_regs.c
index d1dd0bc19f89..f0e627d73c88 100644
--- a/sys/fs/procfs/procfs_regs.c
+++ b/sys/fs/procfs/procfs_regs.c
@@ -43,6 +43,7 @@
#include <sys/param.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>
diff --git a/sys/i386/i386/procfs_machdep.c b/sys/i386/i386/procfs_machdep.c
index 5ca703ad65bf..292214f16c06 100644
--- a/sys/i386/i386/procfs_machdep.c
+++ b/sys/i386/i386/procfs_machdep.c
@@ -71,6 +71,7 @@
#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>
diff --git a/sys/i386/i386/tsc.c b/sys/i386/i386/tsc.c
index 7d8edac1a0ef..9034f8146195 100644
--- a/sys/i386/i386/tsc.c
+++ b/sys/i386/i386/tsc.c
@@ -56,14 +56,12 @@
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/ipl.h>
+#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/time.h>
#include <sys/timetc.h>
#include <sys/kernel.h>
-#ifndef SMP
-#include <sys/lock.h>
-#endif
#include <sys/sysctl.h>
#include <sys/cons.h>
diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c
index 7d8edac1a0ef..9034f8146195 100644
--- a/sys/i386/isa/clock.c
+++ b/sys/i386/isa/clock.c
@@ -56,14 +56,12 @@
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/ipl.h>
+#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/time.h>
#include <sys/timetc.h>
#include <sys/kernel.h>
-#ifndef SMP
-#include <sys/lock.h>
-#endif
#include <sys/sysctl.h>
#include <sys/cons.h>
diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c
index 7d8edac1a0ef..9034f8146195 100644
--- a/sys/isa/atrtc.c
+++ b/sys/isa/atrtc.c
@@ -56,14 +56,12 @@
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/ipl.h>
+#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/time.h>
#include <sys/timetc.h>
#include <sys/kernel.h>
-#ifndef SMP
-#include <sys/lock.h>
-#endif
#include <sys/sysctl.h>
#include <sys/cons.h>
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index f35f86412fce..048f47888a0b 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -38,6 +38,7 @@
#include <sys/imgact.h>
#include <sys/imgact_elf.h>
#include <sys/kernel.h>
+#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mutex.h>
#include <sys/mman.h>
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c
index 6e99f24b0933..72d8c628d5e7 100644
--- a/sys/kern/kern_clock.c
+++ b/sys/kern/kern_clock.c
@@ -47,6 +47,7 @@
#include <sys/callout.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>
@@ -54,7 +55,6 @@
#include <sys/timetc.h>
#include <sys/timepps.h>
#include <vm/vm.h>
-#include <sys/lock.h>
#include <vm/pmap.h>
#include <vm/vm_map.h>
#include <sys/sysctl.h>
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 7ddf7f07a08d..dec02a57ca7b 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -47,6 +47,7 @@
#include <sys/sysproto.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
+#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/pioctl.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_zone.h>
diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c
index 011396772ec3..aa4d84a85c8a 100644
--- a/sys/kern/kern_intr.c
+++ b/sys/kern/kern_intr.c
@@ -37,6 +37,7 @@
#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>
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c
index d4a61ebc3f41..61ec3300052f 100644
--- a/sys/kern/kern_resource.c
+++ b/sys/kern/kern_resource.c
@@ -47,15 +47,15 @@
#include <sys/sysproto.h>
#include <sys/file.h>
#include <sys/kernel.h>
-#include <sys/resourcevar.h>
+#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mutex.h>
#include <sys/proc.h>
+#include <sys/resourcevar.h>
#include <sys/time.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/kern/kern_switch.c b/sys/kern/kern_switch.c
index 0a6a9d48acae..e7e1dc52fe69 100644
--- a/sys/kern/kern_switch.c
+++ b/sys/kern/kern_switch.c
@@ -30,6 +30,7 @@
#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/queue.h>
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index 6543b41dfd3f..99fe4715a3b8 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -43,6 +43,7 @@
#include <sys/systm.h>
#include <sys/callout.h>
#include <sys/kernel.h>
+#include <sys/lock.h>
#include <sys/mutex.h>
/*
diff --git a/sys/kern/subr_eventhandler.c b/sys/kern/subr_eventhandler.c
index 5c524d88a5ba..5e1ce48cc8e7 100644
--- a/sys/kern/subr_eventhandler.c
+++ b/sys/kern/subr_eventhandler.c
@@ -28,6 +28,7 @@
#include <sys/param.h>
#include <sys/kernel.h>
+#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mutex.h>
#include <sys/systm.h>
diff --git a/sys/miscfs/procfs/procfs_dbregs.c b/sys/miscfs/procfs/procfs_dbregs.c
index 6d35da0fefda..c21597fdb437 100644
--- a/sys/miscfs/procfs/procfs_dbregs.c
+++ b/sys/miscfs/procfs/procfs_dbregs.c
@@ -46,6 +46,7 @@
#include <sys/param.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>
diff --git a/sys/miscfs/procfs/procfs_fpregs.c b/sys/miscfs/procfs/procfs_fpregs.c
index 493939ca5457..49853c48fc7f 100644
--- a/sys/miscfs/procfs/procfs_fpregs.c
+++ b/sys/miscfs/procfs/procfs_fpregs.c
@@ -43,6 +43,7 @@
#include <sys/param.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>
diff --git a/sys/miscfs/procfs/procfs_regs.c b/sys/miscfs/procfs/procfs_regs.c
index d1dd0bc19f89..f0e627d73c88 100644
--- a/sys/miscfs/procfs/procfs_regs.c
+++ b/sys/miscfs/procfs/procfs_regs.c
@@ -43,6 +43,7 @@
#include <sys/param.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>
diff --git a/sys/net/if_var.h b/sys/net/if_var.h
index 53a7b1e36159..21cf17432eba 100644
--- a/sys/net/if_var.h
+++ b/sys/net/if_var.h
@@ -77,8 +77,10 @@ struct ether_header;
#ifdef _KERNEL
#include <sys/mbuf.h>
+#include <sys/systm.h> /* XXX */
#endif /* _KERNEL */
-#include <sys/mutex.h>
+#include <sys/lock.h> /* XXX */
+#include <sys/mutex.h> /* XXX */
TAILQ_HEAD(ifnethead, ifnet); /* we use TAILQs so that the order of */
TAILQ_HEAD(ifaddrhead, ifaddr); /* instantiation is preserved in the list */
diff --git a/sys/netgraph/netgraph.h b/sys/netgraph/netgraph.h
index 27278b33d336..c1f03ce8686b 100644
--- a/sys/netgraph/netgraph.h
+++ b/sys/netgraph/netgraph.h
@@ -47,6 +47,7 @@
#endif
#include <sys/queue.h>
+#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/module.h>
#include <sys/mutex.h>
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index 2471f7cba253..25f668bb9abc 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -37,6 +37,7 @@
#ifndef _SYS_MBUF_H_
#define _SYS_MBUF_H_
+#include <sys/lock.h>
#include <sys/mutex.h> /* XXX */
/*
diff --git a/sys/sys/resourcevar.h b/sys/sys/resourcevar.h
index ed1f76073416..598c806d1539 100644
--- a/sys/sys/resourcevar.h
+++ b/sys/sys/resourcevar.h
@@ -39,6 +39,7 @@
#include <sys/resource.h>
#include <sys/queue.h>
+#include <sys/lock.h> /* XXX */
#include <sys/mutex.h> /* XXX */
/*
diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h
index 773509115f51..9596dd6c0578 100644
--- a/sys/sys/ucred.h
+++ b/sys/sys/ucred.h
@@ -37,7 +37,8 @@
#ifndef _SYS_UCRED_H_
#define _SYS_UCRED_H_
-#include <sys/mutex.h>
+#include <sys/lock.h> /* XXX */
+#include <sys/mutex.h> /* XXX */
/*
* Credentials.
diff --git a/sys/sys/user.h b/sys/sys/user.h
index 9944c0d9de8f..fab30c3a5a05 100644
--- a/sys/sys/user.h
+++ b/sys/sys/user.h
@@ -45,11 +45,12 @@
#include <sys/resource.h>
#include <sys/ucred.h>
#include <sys/uio.h>
+#include <sys/lock.h> /* XXX */
+#include <sys/mutex.h> /* XXX */
#include <sys/proc.h>
#include <vm/vm.h> /* XXX */
#include <vm/vm_param.h> /* XXX */
#include <vm/pmap.h> /* XXX */
-#include <sys/lock.h> /* XXX */
#include <vm/vm_map.h> /* XXX */
#endif /* !_KERNEL */
#ifndef _SYS_RESOURCEVAR_H_
diff --git a/sys/vm/vm_zone.h b/sys/vm/vm_zone.h
index aab44c3f6a73..8cb5b8ed9ad3 100644
--- a/sys/vm/vm_zone.h
+++ b/sys/vm/vm_zone.h
@@ -21,6 +21,7 @@
#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>
typedef struct vm_zone {