summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2006-11-09 23:33:45 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:26:52 +0200
commitd1ee506ebd11d305e5384ea0edf072d8076b4eac (patch)
tree5a2a6137f38f9b8f6bc11b1ee1f9a3f281ad563e
parentd9154ed8a6abfaddaedd0697c5c94e12edb05e2f (diff)
2006-11-09 Barry deFreese <bddebian@comcast.net>
[task #5726 --- ``GCC built-in functions''] * include/printf.h: Move file... * kern/printf.h: ... here. * kern/debug.h (panic_init, panic): Add prototypes. * chips/busses.c: Don't include `printf.h', include `kern/printf.h' and `kern/debug.h'. * ddb/db_command.c: Likewise. * ddb/db_cond.c: Likewise. * ddb/db_output.c: Likewise. * device/cirbuf.c: Likewise. * device/cons.c: Likewise. * device/dev_name.c: Likewise. * device/dev_pager.c: Likewise. * device/device_init.c: Likewise. * device/dk_label.c: Likewise. * device/ds_routines.c: Likewise. * device/net_io.c: Likewise. * device/subrs.c: Likewise. * i386/i386/debug_i386.c: Likewise. * i386/i386/fpe_linkage.c: Likewise. * i386/i386/fpu.c: Likewise. * i386/i386/io_map.c: Likewise. * i386/i386/kttd_interface.c: Likewise. * i386/i386/mp_desc.c: Likewise. * i386/i386/pcb.c: Likewise. * i386/i386/pic.c: Likewise. * i386/i386/trap.c: Likewise. * i386/i386at/autoconf.c: Likewise. * i386/i386at/com.c: Likewise. * i386/i386at/i386at_ds_routines.c: Likewise. * i386/i386at/kd.c: Likewise. * i386/i386at/kd_event.c: Likewise. * i386/i386at/kd_mouse.c: Likewise. * i386/i386at/lpr.c: Likewise. * i386/i386at/model_dep.c: Likewise. * i386/intel/pmap.c: Likewise. * ipc/ipc_entry.c: Likewise. * ipc/ipc_hash.c: Likewise. * ipc/ipc_kmsg.c: Likewise. * ipc/ipc_mqueue.c: Likewise. * ipc/ipc_notify.c: Likewise. * ipc/ipc_object.c: Likewise. * ipc/ipc_port.c: Likewise. * ipc/ipc_pset.c: Likewise. * ipc/ipc_right.c: Likewise. * ipc/mach_msg.c: Likewise. * ipc/mach_port.c: Likewise. * ipc/mach_rpc.c: Likewise. * kern/act.c: Likewise. * kern/ast.c: Likewise. * kern/bootstrap.c: Likewise. * kern/debug.c: Likewise. * kern/eventcount.c: Likewise. * kern/exception.c: Likewise. * kern/host.c: Likewise. * kern/ipc_host.c: Likewise. * kern/ipc_kobject.c: Likewise. * kern/ipc_mig.c: Likewise. * kern/ipc_sched.c: Likewise. * kern/ipc_tt.c: Likewise. * kern/kalloc.c: Likewise. * kern/lock.c: Likewise. * kern/mach_clock.c: Likewise. * kern/machine.c: Likewise. * kern/pc_sample.c: Likewise. * kern/printf.c: Likewise. * kern/processor.c: Likewise. * kern/sched_prim.c: Likewise. * kern/server_loop.ch: Likewise. * kern/startup.c: Likewise. * kern/task.c: Likewise. * kern/thread.c: Likewise. * kern/thread_swap.c: Likewise. * kern/xpr.c: Likewise. * kern/zalloc.c: Likewise. * vm/memory_object.c: Likewise. * vm/vm_debug.c: Likewise. * vm/vm_fault.c: Likewise. * vm/vm_kern.c: Likewise. * vm/vm_map.c: Likewise. * vm/vm_object.c: Likewise. * vm/vm_object.h: Likewise. * vm/vm_pageout.c: Likewise. * vm/vm_resident.c: Likewise.
-rw-r--r--ChangeLog87
-rw-r--r--chips/busses.c2
-rw-r--r--ddb/db_command.c1
-rw-r--r--ddb/db_cond.c1
-rw-r--r--ddb/db_output.c2
-rw-r--r--device/cirbuf.c1
-rw-r--r--device/cons.c1
-rw-r--r--device/dev_name.c2
-rw-r--r--device/dev_pager.c3
-rw-r--r--device/device_init.c1
-rw-r--r--device/dk_label.c2
-rw-r--r--device/ds_routines.c4
-rw-r--r--device/net_io.c3
-rw-r--r--device/subrs.c3
-rw-r--r--i386/i386/debug_i386.c2
-rw-r--r--i386/i386/fpe_linkage.c1
-rw-r--r--i386/i386/fpu.c3
-rw-r--r--i386/i386/io_map.c2
-rw-r--r--i386/i386/kttd_interface.c2
-rw-r--r--i386/i386/mp_desc.c1
-rw-r--r--i386/i386/pcb.c1
-rw-r--r--i386/i386/pic.c2
-rw-r--r--i386/i386/trap.c3
-rw-r--r--i386/i386at/autoconf.c2
-rw-r--r--i386/i386at/com.c2
-rw-r--r--i386/i386at/i386at_ds_routines.c2
-rw-r--r--i386/i386at/kd.c3
-rw-r--r--i386/i386at/kd_event.c2
-rw-r--r--i386/i386at/kd_mouse.c2
-rw-r--r--i386/i386at/lpr.c2
-rw-r--r--i386/i386at/model_dep.c3
-rw-r--r--i386/intel/pmap.c3
-rw-r--r--ipc/ipc_entry.c2
-rw-r--r--ipc/ipc_hash.c2
-rw-r--r--ipc/ipc_kmsg.c2
-rw-r--r--ipc/ipc_mqueue.c1
-rw-r--r--ipc/ipc_notify.c2
-rw-r--r--ipc/ipc_object.c3
-rw-r--r--ipc/ipc_port.c2
-rw-r--r--ipc/ipc_pset.c2
-rw-r--r--ipc/ipc_right.c1
-rw-r--r--ipc/mach_msg.c3
-rw-r--r--ipc/mach_port.c3
-rw-r--r--ipc/mach_rpc.c2
-rw-r--r--kern/act.c1
-rw-r--r--kern/ast.c1
-rw-r--r--kern/bootstrap.c3
-rw-r--r--kern/debug.c6
-rw-r--r--kern/debug.h3
-rw-r--r--kern/eventcount.c3
-rw-r--r--kern/exception.c1
-rw-r--r--kern/host.c1
-rw-r--r--kern/ipc_host.c1
-rw-r--r--kern/ipc_kobject.c3
-rw-r--r--kern/ipc_mig.c1
-rw-r--r--kern/ipc_sched.c1
-rw-r--r--kern/ipc_tt.c1
-rw-r--r--kern/kalloc.c1
-rw-r--r--kern/lock.c1
-rw-r--r--kern/mach_clock.c1
-rw-r--r--kern/machine.c1
-rw-r--r--kern/pc_sample.c2
-rw-r--r--kern/printf.c2
-rw-r--r--kern/printf.h (renamed from include/printf.h)0
-rw-r--r--kern/processor.c1
-rw-r--r--kern/sched_prim.c3
-rw-r--r--kern/server_loop.ch1
-rw-r--r--kern/startup.c3
-rw-r--r--kern/task.c1
-rw-r--r--kern/thread.c3
-rw-r--r--kern/thread_swap.c1
-rw-r--r--kern/xpr.c1
-rw-r--r--kern/zalloc.c3
-rw-r--r--vm/memory_object.c1
-rw-r--r--vm/vm_debug.c1
-rw-r--r--vm/vm_fault.c3
-rw-r--r--vm/vm_kern.c1
-rw-r--r--vm/vm_map.c3
-rw-r--r--vm/vm_object.c3
-rw-r--r--vm/vm_object.h1
-rw-r--r--vm/vm_pageout.c1
-rw-r--r--vm/vm_resident.c3
82 files changed, 194 insertions, 50 deletions
diff --git a/ChangeLog b/ChangeLog
index 3dec86f..8815e65 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,90 @@
+2006-11-09 Barry deFreese <bddebian@comcast.net>
+
+ [task #5726 --- ``GCC built-in functions'']
+ * include/printf.h: Move file...
+ * kern/printf.h: ... here.
+ * kern/debug.h (panic_init, panic): Add prototypes.
+ * chips/busses.c: Don't include `printf.h', include `kern/printf.h'
+ and `kern/debug.h'.
+ * ddb/db_command.c: Likewise.
+ * ddb/db_cond.c: Likewise.
+ * ddb/db_output.c: Likewise.
+ * device/cirbuf.c: Likewise.
+ * device/cons.c: Likewise.
+ * device/dev_name.c: Likewise.
+ * device/dev_pager.c: Likewise.
+ * device/device_init.c: Likewise.
+ * device/dk_label.c: Likewise.
+ * device/ds_routines.c: Likewise.
+ * device/net_io.c: Likewise.
+ * device/subrs.c: Likewise.
+ * i386/i386/debug_i386.c: Likewise.
+ * i386/i386/fpe_linkage.c: Likewise.
+ * i386/i386/fpu.c: Likewise.
+ * i386/i386/io_map.c: Likewise.
+ * i386/i386/kttd_interface.c: Likewise.
+ * i386/i386/mp_desc.c: Likewise.
+ * i386/i386/pcb.c: Likewise.
+ * i386/i386/pic.c: Likewise.
+ * i386/i386/trap.c: Likewise.
+ * i386/i386at/autoconf.c: Likewise.
+ * i386/i386at/com.c: Likewise.
+ * i386/i386at/i386at_ds_routines.c: Likewise.
+ * i386/i386at/kd.c: Likewise.
+ * i386/i386at/kd_event.c: Likewise.
+ * i386/i386at/kd_mouse.c: Likewise.
+ * i386/i386at/lpr.c: Likewise.
+ * i386/i386at/model_dep.c: Likewise.
+ * i386/intel/pmap.c: Likewise.
+ * ipc/ipc_entry.c: Likewise.
+ * ipc/ipc_hash.c: Likewise.
+ * ipc/ipc_kmsg.c: Likewise.
+ * ipc/ipc_mqueue.c: Likewise.
+ * ipc/ipc_notify.c: Likewise.
+ * ipc/ipc_object.c: Likewise.
+ * ipc/ipc_port.c: Likewise.
+ * ipc/ipc_pset.c: Likewise.
+ * ipc/ipc_right.c: Likewise.
+ * ipc/mach_msg.c: Likewise.
+ * ipc/mach_port.c: Likewise.
+ * ipc/mach_rpc.c: Likewise.
+ * kern/act.c: Likewise.
+ * kern/ast.c: Likewise.
+ * kern/bootstrap.c: Likewise.
+ * kern/debug.c: Likewise.
+ * kern/eventcount.c: Likewise.
+ * kern/exception.c: Likewise.
+ * kern/host.c: Likewise.
+ * kern/ipc_host.c: Likewise.
+ * kern/ipc_kobject.c: Likewise.
+ * kern/ipc_mig.c: Likewise.
+ * kern/ipc_sched.c: Likewise.
+ * kern/ipc_tt.c: Likewise.
+ * kern/kalloc.c: Likewise.
+ * kern/lock.c: Likewise.
+ * kern/mach_clock.c: Likewise.
+ * kern/machine.c: Likewise.
+ * kern/pc_sample.c: Likewise.
+ * kern/printf.c: Likewise.
+ * kern/processor.c: Likewise.
+ * kern/sched_prim.c: Likewise.
+ * kern/server_loop.ch: Likewise.
+ * kern/startup.c: Likewise.
+ * kern/task.c: Likewise.
+ * kern/thread.c: Likewise.
+ * kern/thread_swap.c: Likewise.
+ * kern/xpr.c: Likewise.
+ * kern/zalloc.c: Likewise.
+ * vm/memory_object.c: Likewise.
+ * vm/vm_debug.c: Likewise.
+ * vm/vm_fault.c: Likewise.
+ * vm/vm_kern.c: Likewise.
+ * vm/vm_map.c: Likewise.
+ * vm/vm_object.c: Likewise.
+ * vm/vm_object.h: Likewise.
+ * vm/vm_pageout.c: Likewise.
+ * vm/vm_resident.c: Likewise.
+
2006-11-08 Thomas Schwinge <tschwinge@gnu.org>
* aclocal.m4: Regenerate using GNU Autoconf 2.60 and GNU Automake 1.10.
diff --git a/chips/busses.c b/chips/busses.c
index 94f580e..89afa97 100644
--- a/chips/busses.c
+++ b/chips/busses.c
@@ -36,8 +36,8 @@
*
*/
-#include <printf.h>
#include <string.h>
+#include <kern/printf.h>
#include <mach/boolean.h>
#include <mach/std_types.h>
#include <chips/busses.h>
diff --git a/ddb/db_command.c b/ddb/db_command.c
index b6927e6..56bde0d 100644
--- a/ddb/db_command.c
+++ b/ddb/db_command.c
@@ -44,6 +44,7 @@
#include <ddb/db_task_thread.h>
#include <machine/setjmp.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/thread.h>
#include <ipc/ipc_pset.h> /* 4proto */
#include <ipc/ipc_port.h> /* 4proto */
diff --git a/ddb/db_cond.c b/ddb/db_cond.c
index cbaf5a4..e968c5c 100644
--- a/ddb/db_cond.c
+++ b/ddb/db_cond.c
@@ -33,6 +33,7 @@
#include <ddb/db_break.h>
#include <ddb/db_command.h>
+#include <kern/debug.h> /* for panic() */
#define DB_MAX_COND 10 /* maximum conditions to be set */
diff --git a/ddb/db_output.c b/ddb/db_output.c
index 1506bcd..6433901 100644
--- a/ddb/db_output.c
+++ b/ddb/db_output.c
@@ -34,7 +34,7 @@
* Printf and character output for debugger.
*/
-#include <printf.h>
+#include <kern/printf.h>
#include <stdarg.h>
#include <mach/boolean.h>
#include <machine/db_machdep.h>
diff --git a/device/cirbuf.c b/device/cirbuf.c
index c6ca196..635f719 100644
--- a/device/cirbuf.c
+++ b/device/cirbuf.c
@@ -32,6 +32,7 @@
#include <string.h>
#include <device/cirbuf.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/kalloc.h>
diff --git a/device/cons.c b/device/cons.c
index ded971e..12be7eb 100644
--- a/device/cons.c
+++ b/device/cons.c
@@ -21,6 +21,7 @@
*/
#include <string.h>
+#include <kern/debug.h> /* for panic() */
#ifdef MACH_KERNEL
#include <sys/types.h>
#include <device/conf.h>
diff --git a/device/dev_name.c b/device/dev_name.c
index 1f41335..cef1efd 100644
--- a/device/dev_name.c
+++ b/device/dev_name.c
@@ -28,7 +28,7 @@
* Date: 8/89
*/
-#include <printf.h>
+#include <kern/printf.h>
#include <string.h>
#include <device/device_types.h>
#include <device/dev_hdr.h>
diff --git a/device/dev_pager.c b/device/dev_pager.c
index be2daa4..a4724a9 100644
--- a/device/dev_pager.c
+++ b/device/dev_pager.c
@@ -30,7 +30,6 @@
* Device pager.
*/
-#include <printf.h>
#include <string.h>
#include <mach/boolean.h>
@@ -42,6 +41,8 @@
#include <ipc/ipc_port.h>
#include <ipc/ipc_space.h>
+#include <kern/debug.h> /* for panic() */
+#include <kern/printf.h>
#include <kern/queue.h>
#include <kern/zalloc.h>
#include <kern/kalloc.h>
diff --git a/device/device_init.c b/device/device_init.c
index 292de92..3169db3 100644
--- a/device/device_init.c
+++ b/device/device_init.c
@@ -31,6 +31,7 @@
*/
#include <ipc/ipc_port.h>
#include <ipc/ipc_space.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/task.h>
#include <device/device_types.h>
diff --git a/device/dk_label.c b/device/dk_label.c
index c3400ef..c7d459b 100644
--- a/device/dk_label.c
+++ b/device/dk_label.c
@@ -31,7 +31,7 @@
*/
#include <sys/types.h>
-#include <printf.h>
+#include <kern/printf.h>
#include <sys/ioctl.h>
#include <device/device_types.h>
#include <device/disk_status.h>
diff --git a/device/ds_routines.c b/device/ds_routines.c
index d1fbd4b..9dccf2d 100644
--- a/device/ds_routines.c
+++ b/device/ds_routines.c
@@ -28,7 +28,7 @@
* Date: 3/89
*/
-#include <printf.h>
+#include <kern/printf.h>
#include <string.h>
#include <mach/boolean.h>
@@ -44,6 +44,8 @@
#include <kern/ast.h>
#include <kern/counters.h>
+#include <kern/debug.h> /* for panic() */
+#include <kern/printf.h>
#include <kern/queue.h>
#include <kern/zalloc.h>
#include <kern/thread.h>
diff --git a/device/net_io.c b/device/net_io.c
index 7091ffa..7a4e459 100644
--- a/device/net_io.c
+++ b/device/net_io.c
@@ -39,7 +39,6 @@
*/
#include <sys/types.h>
-#include <printf.h>
#include <string.h>
#include <device/net_status.h>
@@ -57,7 +56,9 @@
#include <ipc/ipc_mqueue.h>
#include <kern/counters.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/lock.h>
+#include <kern/printf.h>
#include <kern/queue.h>
#include <kern/sched_prim.h>
#include <kern/thread.h>
diff --git a/device/subrs.c b/device/subrs.c
index 4aa0688..7e7ef6a 100644
--- a/device/subrs.c
+++ b/device/subrs.c
@@ -27,7 +27,8 @@
* Random device subroutines and stubs.
*/
-#include <printf.h>
+#include <kern/debug.h> /* for panic() */
+#include <kern/printf.h>
#include <vm/vm_kern.h>
#include <device/buf.h>
#include <device/if_hdr.h>
diff --git a/i386/i386/debug_i386.c b/i386/i386/debug_i386.c
index d758e43..b897e63 100644
--- a/i386/i386/debug_i386.c
+++ b/i386/i386/debug_i386.c
@@ -21,7 +21,7 @@
* Author: Bryan Ford, University of Utah CSL
*/
-#include <printf.h>
+#include <kern/printf.h>
#include "thread.h"
#include "trap.h"
diff --git a/i386/i386/fpe_linkage.c b/i386/i386/fpe_linkage.c
index be39420..b91d825 100644
--- a/i386/i386/fpe_linkage.c
+++ b/i386/i386/fpe_linkage.c
@@ -37,6 +37,7 @@
#include <mach/thread_status.h>
#include <kern/cpu_number.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/thread.h>
#include <vm/vm_kern.h>
diff --git a/i386/i386/fpu.c b/i386/i386/fpu.c
index c61b4a0..fdeb5c7 100644
--- a/i386/i386/fpu.c
+++ b/i386/i386/fpu.c
@@ -27,15 +27,16 @@
* Support for 80387 floating point or FP emulator.
*/
-#include <printf.h>
#include <string.h>
#include <mach/exception.h>
#include <mach/machine/thread_status.h>
#include <mach/machine/fp_reg.h>
+#include <kern/debug.h> /* for panic() */
#include <machine/machspl.h> /* spls */
#include <kern/mach_param.h>
+#include <kern/printf.h>
#include <kern/thread.h>
#include <kern/zalloc.h>
diff --git a/i386/i386/io_map.c b/i386/i386/io_map.c
index 00c9a7a..7ed0e26 100644
--- a/i386/i386/io_map.c
+++ b/i386/i386/io_map.c
@@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*/
-#include <printf.h>
+#include <kern/printf.h>
#include <mach/vm_param.h>
#include <vm/vm_kern.h>
#include <vm/vm_map.h>
diff --git a/i386/i386/kttd_interface.c b/i386/i386/kttd_interface.c
index 016bd9c..d744c0e 100644
--- a/i386/i386/kttd_interface.c
+++ b/i386/i386/kttd_interface.c
@@ -27,7 +27,7 @@
#if MACH_TTD
#include <sys/types.h>
-#include <printf.h>
+#include <kern/printf.h>
#include <mach/machine/eflags.h>
diff --git a/i386/i386/mp_desc.c b/i386/i386/mp_desc.c
index f5b07ab..dc18434 100644
--- a/i386/i386/mp_desc.c
+++ b/i386/i386/mp_desc.c
@@ -29,6 +29,7 @@
#include <string.h>
#include <kern/cpu_number.h>
+#include <kern/debug.h> /* for panic() */
#include <mach/machine.h>
#include <vm/vm_kern.h>
diff --git a/i386/i386/pcb.c b/i386/i386/pcb.c
index a18a5e6..2fd96c6 100644
--- a/i386/i386/pcb.c
+++ b/i386/i386/pcb.c
@@ -33,6 +33,7 @@
#include "vm_param.h"
#include <kern/counters.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/mach_param.h>
#include <kern/thread.h>
#include <kern/sched_prim.h>
diff --git a/i386/i386/pic.c b/i386/i386/pic.c
index 58953fc..f73745c 100644
--- a/i386/i386/pic.c
+++ b/i386/i386/pic.c
@@ -50,7 +50,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <sys/types.h>
-#include <printf.h>
+#include <kern/printf.h>
#include <i386/ipl.h>
#include <i386/pic.h>
#include <i386/machspl.h>
diff --git a/i386/i386/trap.c b/i386/i386/trap.c
index 16a9405..5b8962e 100644
--- a/i386/i386/trap.c
+++ b/i386/i386/trap.c
@@ -28,7 +28,6 @@
*/
#include <sys/types.h>
-#include <printf.h>
#include <string.h>
#include <mach/machine/eflags.h>
@@ -44,6 +43,8 @@
#include <vm/vm_map.h>
#include <kern/ast.h>
+#include <kern/debug.h> /* for panic() */
+#include <kern/printf.h>
#include <kern/thread.h>
#include <kern/task.h>
#include <kern/sched.h>
diff --git a/i386/i386at/autoconf.c b/i386/i386at/autoconf.c
index d6cfe3d..48e1278 100644
--- a/i386/i386at/autoconf.c
+++ b/i386/i386at/autoconf.c
@@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*/
-#include <printf.h>
+#include <kern/printf.h>
#ifdef MACH_KERNEL
#include <mach/std_types.h>
#else /* MACH_KERNEL */
diff --git a/i386/i386at/com.c b/i386/i386at/com.c
index 7ff8815..6142999 100644
--- a/i386/i386at/com.c
+++ b/i386/i386at/com.c
@@ -28,7 +28,7 @@
#include <mach/std_types.h>
#include <sys/types.h>
-#include <printf.h>
+#include <kern/printf.h>
#include <sys/time.h>
#include <device/conf.h>
#include <device/errno.h>
diff --git a/i386/i386at/i386at_ds_routines.c b/i386/i386at/i386at_ds_routines.c
index bc2a433..0cd8b54 100644
--- a/i386/i386at/i386at_ds_routines.c
+++ b/i386/i386at/i386at_ds_routines.c
@@ -23,7 +23,7 @@
* Author: Shantanu Goel, University of Utah CSL
*/
-#include <printf.h>
+#include <kern/printf.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c
index 09ea902..c1389c2 100644
--- a/i386/i386at/kd.c
+++ b/i386/i386at/kd.c
@@ -77,7 +77,8 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* $ Header: $ */
#include <sys/types.h>
-#include <printf.h>
+#include <kern/debug.h> /* for panic() */
+#include <kern/printf.h>
#include <kern/time_out.h>
#include <device/conf.h>
#include <device/tty.h>
diff --git a/i386/i386at/kd_event.c b/i386/i386at/kd_event.c
index b10d7f3..c421820 100644
--- a/i386/i386at/kd_event.c
+++ b/i386/i386at/kd_event.c
@@ -56,7 +56,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <mach/boolean.h>
#include <sys/types.h>
-#include <printf.h>
+#include <kern/printf.h>
#include <string.h>
#ifdef MACH_KERNEL
diff --git a/i386/i386at/kd_mouse.c b/i386/i386at/kd_mouse.c
index a89d6b2..52358f1 100644
--- a/i386/i386at/kd_mouse.c
+++ b/i386/i386at/kd_mouse.c
@@ -66,7 +66,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <mach/boolean.h>
#include <sys/types.h>
-#include <printf.h>
+#include <kern/printf.h>
#ifdef MACH_KERNEL
#include <device/errno.h>
#include <device/io_req.h>
diff --git a/i386/i386at/lpr.c b/i386/i386at/lpr.c
index f071d23..1483687 100644
--- a/i386/i386at/lpr.c
+++ b/i386/i386at/lpr.c
@@ -33,7 +33,7 @@
#ifdef MACH_KERNEL
#include <mach/std_types.h>
#include <sys/types.h>
-#include <printf.h>
+#include <kern/printf.h>
#include <sys/time.h>
#include <device/conf.h>
#include <device/errno.h>
diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c
index f31a8d7..06b8d12 100644
--- a/i386/i386at/model_dep.c
+++ b/i386/i386at/model_dep.c
@@ -32,7 +32,6 @@
* Basic initialization for I386 - ISA bus machines.
*/
-#include <printf.h>
#include <string.h>
#include <mach/vm_param.h>
@@ -44,6 +43,8 @@
#include <kern/time_out.h>
#include <kern/assert.h>
#include <kern/cpu_number.h>
+#include <kern/debug.h> /* for panic() */
+#include <kern/printf.h>
#include <sys/time.h>
#include <vm/vm_page.h>
#include <i386/machspl.h>
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c
index e75d054..ec19766 100644
--- a/i386/intel/pmap.c
+++ b/i386/intel/pmap.c
@@ -55,12 +55,13 @@
* and to when physical maps must be made correct.
*/
-#include <printf.h>
#include <string.h>
#include <mach/machine/vm_types.h>
#include <mach/boolean.h>
+#include <kern/debug.h> /* for panic() */
+#include <kern/printf.h>
#include <kern/thread.h>
#include <kern/zalloc.h>
diff --git a/ipc/ipc_entry.c b/ipc/ipc_entry.c
index 705638d..9084411 100644
--- a/ipc/ipc_entry.c
+++ b/ipc/ipc_entry.c
@@ -34,7 +34,7 @@
* Primitive functions to manipulate translation entries.
*/
-#include <printf.h>
+#include <kern/printf.h>
#include <string.h>
#include <mach/kern_return.h>
diff --git a/ipc/ipc_hash.c b/ipc/ipc_hash.c
index 4f21073..ce720c7 100644
--- a/ipc/ipc_hash.c
+++ b/ipc/ipc_hash.c
@@ -31,7 +31,7 @@
* Entry hash table operations.
*/
-#include <printf.h>
+#include <kern/printf.h>
#include <mach/boolean.h>
#include <mach/port.h>
#include <kern/lock.h>
diff --git a/ipc/ipc_kmsg.c b/ipc/ipc_kmsg.c
index 1c9ef87..f918bd4 100644
--- a/ipc/ipc_kmsg.c
+++ b/ipc/ipc_kmsg.c
@@ -34,7 +34,7 @@
* Operations on kernel messages.
*/
-#include <printf.h>
+#include <kern/printf.h>
#include <string.h>
#include <mach/boolean.h>
diff --git a/ipc/ipc_mqueue.c b/ipc/ipc_mqueue.c
index e0ebc86..4aee2cc 100644
--- a/ipc/ipc_mqueue.c
+++ b/ipc/ipc_mqueue.c
@@ -38,6 +38,7 @@
#include <mach/message.h>
#include <kern/assert.h>
#include <kern/counters.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/sched_prim.h>
#include <kern/ipc_sched.h>
#include <kern/ipc_kobject.h>
diff --git a/ipc/ipc_notify.c b/ipc/ipc_notify.c
index 30cfac4..3dea9fc 100644
--- a/ipc/ipc_notify.c
+++ b/ipc/ipc_notify.c
@@ -31,7 +31,7 @@
* Notification-sending functions.
*/
-#include <printf.h>
+#include <kern/printf.h>
#include <mach/port.h>
#include <mach/message.h>
#include <mach/notify.h>
diff --git a/ipc/ipc_object.c b/ipc/ipc_object.c
index 53f7793..d2f60f9 100644
--- a/ipc/ipc_object.c
+++ b/ipc/ipc_object.c
@@ -31,7 +31,6 @@
* Functions to manipulate IPC objects.
*/
-#include <printf.h>
#include <string.h>
#include <mach/boolean.h>
@@ -46,6 +45,8 @@
#include <ipc/ipc_right.h>
#include <ipc/ipc_notify.h>
#include <ipc/ipc_pset.h>
+#include <kern/debug.h> /* for panic() */
+#include <kern/printf.h>
zone_t ipc_object_zones[IOT_NUMBER];
diff --git a/ipc/ipc_port.c b/ipc/ipc_port.c
index fa8ed3a..f19cca6 100644
--- a/ipc/ipc_port.c
+++ b/ipc/ipc_port.c
@@ -34,7 +34,7 @@
* Functions to manipulate IPC ports.
*/
-#include <printf.h>
+#include <kern/printf.h>
#include <string.h>
#include <mach/port.h>
diff --git a/ipc/ipc_pset.c b/ipc/ipc_pset.c
index 049c66d..141cbdb 100644
--- a/ipc/ipc_pset.c
+++ b/ipc/ipc_pset.c
@@ -36,7 +36,7 @@
* Functions to manipulate IPC port sets.
*/
-#include <printf.h>
+#include <kern/printf.h>
#include <mach/port.h>
#include <mach/kern_return.h>
#include <mach/message.h>
diff --git a/ipc/ipc_right.c b/ipc/ipc_right.c
index b1e538d..176ecc6 100644
--- a/ipc/ipc_right.c
+++ b/ipc/ipc_right.c
@@ -38,6 +38,7 @@
#include <mach/port.h>
#include <mach/message.h>
#include <kern/assert.h>
+#include <kern/debug.h> /* for panic() */
#include <ipc/port.h>
#include <ipc/ipc_entry.h>
#include <ipc/ipc_space.h>
diff --git a/ipc/mach_msg.c b/ipc/mach_msg.c
index a02462d..0fe2f7c 100644
--- a/ipc/mach_msg.c
+++ b/ipc/mach_msg.c
@@ -36,13 +36,14 @@
* Exported message traps. See mach/message.h.
*/
-#include <printf.h>
#include <mach/kern_return.h>
#include <mach/port.h>
#include <mach/message.h>
#include <kern/assert.h>
#include <kern/counters.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/lock.h>
+#include <kern/printf.h>
#include <kern/sched_prim.h>
#include <kern/ipc_sched.h>
#include <vm/vm_map.h>
diff --git a/ipc/mach_port.c b/ipc/mach_port.c
index b78ab25..a739aa0 100644
--- a/ipc/mach_port.c
+++ b/ipc/mach_port.c
@@ -36,7 +36,8 @@
* Exported kernel calls. See mach/mach_port.defs.
*/
-#include <printf.h>
+#include <kern/debug.h> /* for panic() */
+#include <kern/printf.h>
#include <mach/port.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
diff --git a/ipc/mach_rpc.c b/ipc/mach_rpc.c
index dae097a..7f5b2eb 100644
--- a/ipc/mach_rpc.c
+++ b/ipc/mach_rpc.c
@@ -21,7 +21,7 @@
#ifdef MIGRATING_THREADS
-#include <printf.h>
+#include <kern/printf.h>
#include <mach/kern_return.h>
#include <mach/port.h>
#include <mach/rpc.h>
diff --git a/kern/act.c b/kern/act.c
index a7a8ac9..2954826 100644
--- a/kern/act.c
+++ b/kern/act.c
@@ -35,6 +35,7 @@
#include <kern/zalloc.h>
#include <kern/thread.h>
#include <kern/task.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/act.h>
#include <kern/current.h>
#include "ipc_target.h"
diff --git a/kern/ast.c b/kern/ast.c
index 8fff997..1d967fc 100644
--- a/kern/ast.c
+++ b/kern/ast.c
@@ -37,6 +37,7 @@
#include <kern/ast.h>
#include <kern/counters.h>
+#include <kern/debug.h> /* for panic() */
#include "cpu_number.h"
#include <kern/queue.h>
#include <kern/sched.h>
diff --git a/kern/bootstrap.c b/kern/bootstrap.c
index 540322d..4539765 100644
--- a/kern/bootstrap.c
+++ b/kern/bootstrap.c
@@ -31,14 +31,15 @@
*/
#include <alloca.h>
-#include <printf.h>
#include <string.h>
#include <mach/port.h>
#include <mach/message.h>
#include <machine/vm_param.h>
#include <ipc/ipc_port.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/host.h>
+#include <kern/printf.h>
#include <kern/task.h>
#include <kern/thread.h>
#include <kern/lock.h>
diff --git a/kern/debug.c b/kern/debug.c
index 42764bd..f8774fc 100644
--- a/kern/debug.c
+++ b/kern/debug.c
@@ -24,16 +24,14 @@
* the rights to redistribute these changes.
*/
-#include <printf.h>
+#include <kern/printf.h>
#include <stdarg.h>
#include "cpu_number.h"
#include <kern/lock.h>
#include <kern/thread.h>
-#warning missing include for panic()
-void panic(const char *s, ...);
-
+#include <kern/debug.h>
extern void cnputc();
void Debugger();
diff --git a/kern/debug.h b/kern/debug.h
index 526ccc6..28e7b73 100644
--- a/kern/debug.h
+++ b/kern/debug.h
@@ -57,4 +57,7 @@
#endif /* NDEBUG */
+extern void panic_init();
+extern void panic (const char *s, ...);
+
#endif /* _mach_debug__debug_ */
diff --git a/kern/eventcount.c b/kern/eventcount.c
index 4a8ebd7..576607c 100644
--- a/kern/eventcount.c
+++ b/kern/eventcount.c
@@ -35,11 +35,12 @@
*
*/
-#include <printf.h>
+#include <kern/printf.h>
#include <string.h>
#include <mach/machine.h>
#include <kern/ast.h>
+#include <kern/debug.h> /* For panic() */
#include "cpu_number.h"
#include <kern/lock.h>
#include <kern/processor.h>
diff --git a/kern/exception.c b/kern/exception.c
index 62292b4..21a3581 100644
--- a/kern/exception.c
+++ b/kern/exception.c
@@ -38,6 +38,7 @@
#include <ipc/mach_msg.h>
#include <ipc/ipc_machdep.h>
#include <kern/counters.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/ipc_tt.h>
#include <kern/task.h>
#include <kern/thread.h>
diff --git a/kern/host.c b/kern/host.c
index 6e98c2c..b1056af 100644
--- a/kern/host.c
+++ b/kern/host.c
@@ -32,6 +32,7 @@
#include <string.h>
#include <kern/assert.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/kalloc.h>
#include <kern/host.h>
#include <mach/host_info.h>
diff --git a/kern/ipc_host.c b/kern/ipc_host.c
index d4049d2..2cf322d 100644
--- a/kern/ipc_host.c
+++ b/kern/ipc_host.c
@@ -33,6 +33,7 @@
*/
#include <mach/message.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/host.h>
#include <kern/processor.h>
#include <kern/task.h>
diff --git a/kern/ipc_kobject.c b/kern/ipc_kobject.c
index d642228..d9fbe17 100644
--- a/kern/ipc_kobject.c
+++ b/kern/ipc_kobject.c
@@ -33,7 +33,8 @@
* Functions for letting a port represent a kernel object.
*/
-#include <printf.h>
+#include <kern/debug.h> /* For panic() */
+#include <kern/printf.h>
#include <mach/port.h>
#include <mach/kern_return.h>
#include <mach/message.h>
diff --git a/kern/ipc_mig.c b/kern/ipc_mig.c
index 4f45eba..cc25f0e 100644
--- a/kern/ipc_mig.c
+++ b/kern/ipc_mig.c
@@ -29,6 +29,7 @@
#include <mach/message.h>
#include <mach/thread_status.h>
#include <kern/ast.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/ipc_tt.h>
#include <kern/thread.h>
#include <kern/task.h>
diff --git a/kern/ipc_sched.c b/kern/ipc_sched.c
index e1edfd6..cfd7b90 100644
--- a/kern/ipc_sched.c
+++ b/kern/ipc_sched.c
@@ -27,6 +27,7 @@
#include <mach/message.h>
#include <kern/counters.h>
#include "cpu_number.h"
+#include <kern/debug.h> /* for panic() */
#include <kern/lock.h>
#include <kern/thread.h>
#include <kern/sched_prim.h>
diff --git a/kern/ipc_tt.c b/kern/ipc_tt.c
index b1a9443..b757bb8 100644
--- a/kern/ipc_tt.c
+++ b/kern/ipc_tt.c
@@ -35,6 +35,7 @@
#include <mach/task_special_ports.h>
#include <mach/thread_special_ports.h>
#include <vm/vm_kern.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/task.h>
#include <kern/thread.h>
#include <kern/ipc_kobject.h>
diff --git a/kern/kalloc.c b/kern/kalloc.c
index 24dfe68..4b9713e 100644
--- a/kern/kalloc.c
+++ b/kern/kalloc.c
@@ -38,6 +38,7 @@
#include <mach/machine/vm_types.h>
#include <mach/vm_param.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/zalloc.h>
#include <kern/kalloc.h>
#include <vm/vm_kern.h>
diff --git a/kern/lock.c b/kern/lock.c
index ba0f0c2..5bdca08 100644
--- a/kern/lock.c
+++ b/kern/lock.c
@@ -36,6 +36,7 @@
#include <string.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/lock.h>
#include <kern/thread.h>
#include <kern/sched_prim.h>
diff --git a/kern/mach_clock.c b/kern/mach_clock.c
index d67897b..c53a7f3 100644
--- a/kern/mach_clock.c
+++ b/kern/mach_clock.c
@@ -43,6 +43,7 @@
#include <mach/vm_prot.h>
#include <kern/counters.h>
#include "cpu_number.h"
+#include <kern/debug.h> /* for panic() */
#include <kern/host.h>
#include <kern/lock.h>
#include <kern/mach_param.h>
diff --git a/kern/machine.c b/kern/machine.c
index 3a5d21f..9f737b4 100644
--- a/kern/machine.c
+++ b/kern/machine.c
@@ -40,6 +40,7 @@
#include <mach/machine.h>
#include <mach/host_info.h>
#include <kern/counters.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/ipc_host.h>
#include <kern/host.h>
#include <kern/lock.h>
diff --git a/kern/pc_sample.c b/kern/pc_sample.c
index a335c47..e26fd41 100644
--- a/kern/pc_sample.c
+++ b/kern/pc_sample.c
@@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*/
-#include <printf.h>
+#include <kern/printf.h>
#include <string.h>
#include <mach/mach_types.h> /* vm_address_t */
diff --git a/kern/printf.c b/kern/printf.c
index 37543b3..22b0987 100644
--- a/kern/printf.c
+++ b/kern/printf.c
@@ -114,7 +114,7 @@
*/
#include <string.h>
-#include <printf.h>
+#include <kern/printf.h>
#include <mach/boolean.h>
#include <kern/lock.h>
#include <stdarg.h>
diff --git a/include/printf.h b/kern/printf.h
index f5930dc..f5930dc 100644
--- a/include/printf.h
+++ b/kern/printf.h
diff --git a/kern/processor.c b/kern/processor.c
index df9cb2e..6b471f8 100644
--- a/kern/processor.c
+++ b/kern/processor.c
@@ -34,6 +34,7 @@
#include <mach/processor_info.h>
#include <mach/vm_param.h>
#include <kern/cpu_number.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/lock.h>
#include <kern/host.h>
#include <kern/processor.h>
diff --git a/kern/sched_prim.c b/kern/sched_prim.c
index 116bfe6..eee0258 100644
--- a/kern/sched_prim.c
+++ b/kern/sched_prim.c
@@ -32,11 +32,12 @@
*
*/
-#include <printf.h>
+#include <kern/printf.h>
#include <mach/machine.h>
#include <kern/ast.h>
#include <kern/counters.h>
#include <kern/cpu_number.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/lock.h>
#include <kern/macro_help.h>
#include <kern/processor.h>
diff --git a/kern/server_loop.ch b/kern/server_loop.ch
index 5a0c69c..7b7b1a5 100644
--- a/kern/server_loop.ch
+++ b/kern/server_loop.ch
@@ -38,6 +38,7 @@
* Must redefine symbols for pager_server functions.
*/
+#include <kern/debug.h> /* for panic() */
#include <mach/port.h>
#include <mach/message.h>
#include <vm/vm_kern.h> /* for kernel_map */
diff --git a/kern/startup.c b/kern/startup.c
index 2957718..16ab508 100644
--- a/kern/startup.c
+++ b/kern/startup.c
@@ -27,13 +27,14 @@
* Mach kernel startup.
*/
-#include <printf.h>
#include <mach/boolean.h>
#include <mach/machine.h>
#include <mach/task_special_ports.h>
#include <mach/vm_param.h>
#include <ipc/ipc_init.h>
#include <kern/cpu_number.h>
+#include <kern/debug.h> /* for panic() */
+#include <kern/printf.h>
#include <kern/processor.h>
#include <kern/sched_prim.h>
#include <kern/task.h>
diff --git a/kern/task.c b/kern/task.c
index f620bdf..d4fa825 100644
--- a/kern/task.c
+++ b/kern/task.c
@@ -39,6 +39,7 @@
#include <mach/task_special_ports.h>
#include <ipc/ipc_space.h>
#include <ipc/ipc_types.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/mach_param.h>
#include <kern/task.h>
#include <kern/thread.h>
diff --git a/kern/thread.c b/kern/thread.c
index 911ceb9..67b7706 100644
--- a/kern/thread.c
+++ b/kern/thread.c
@@ -31,7 +31,7 @@
* Thread management primitives implementation.
*/
-#include <printf.h>
+#include <kern/printf.h>
#include <mach/std_types.h>
#include <mach/policy.h>
#include <mach/thread_info.h>
@@ -41,6 +41,7 @@
#include <machine/vm_param.h>
#include <kern/ast.h>
#include <kern/counters.h>
+#include <kern/debug.h> /* For panic() */
#include <kern/ipc_tt.h>
#include <kern/mach_param.h>
#include <kern/processor.h>
diff --git a/kern/thread_swap.c b/kern/thread_swap.c
index 173b6ae..c5d5183 100644
--- a/kern/thread_swap.c
+++ b/kern/thread_swap.c
@@ -46,6 +46,7 @@
#include <ipc/ipc_kmsg.h>
#include <kern/counters.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/thread.h>
#include <kern/lock.h>
#include <vm/vm_map.h>
diff --git a/kern/xpr.c b/kern/xpr.c
index b5f6e71..147e3af 100644
--- a/kern/xpr.c
+++ b/kern/xpr.c
@@ -29,6 +29,7 @@
*/
#include <string.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/xpr.h>
#include <kern/lock.h>
#include "cpu_number.h"
diff --git a/kern/zalloc.c b/kern/zalloc.c
index e089023..e006177 100644
--- a/kern/zalloc.c
+++ b/kern/zalloc.c
@@ -34,10 +34,11 @@
* data blocks for which quick allocation/deallocation is possible.
*/
-#include <printf.h>
#include <string.h>
+#include <kern/debug.h> /* For panic() */
#include <kern/macro_help.h>
+#include <kern/printf.h>
#include <kern/sched.h>
#include <kern/time_out.h>
#include <kern/zalloc.h>
diff --git a/vm/memory_object.c b/vm/memory_object.c
index 77ec25c..009d736 100644
--- a/vm/memory_object.c
+++ b/vm/memory_object.c
@@ -57,6 +57,7 @@
#include <vm/vm_page.h>
#include <vm/vm_pageout.h>
#include <vm/pmap.h> /* For copy_to_phys, pmap_clear_modify */
+#include <kern/debug.h> /* For panic() */
#include <kern/thread.h> /* For current_thread() */
#include <kern/host.h>
#include <vm/vm_kern.h> /* For kernel_map, vm_move */
diff --git a/vm/vm_debug.c b/vm/vm_debug.c
index 29ec8da..60fd361 100644
--- a/vm/vm_debug.c
+++ b/vm/vm_debug.c
@@ -35,6 +35,7 @@
#include <string.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/thread.h>
#include <mach/kern_return.h>
#include <mach/machine/vm_types.h>
diff --git a/vm/vm_fault.c b/vm/vm_fault.c
index 0506e0a..632a852 100644
--- a/vm/vm_fault.c
+++ b/vm/vm_fault.c
@@ -33,11 +33,12 @@
* Page fault handling module.
*/
-#include <printf.h>
+#include <kern/printf.h>
#include <vm/vm_fault.h>
#include <mach/kern_return.h>
#include <mach/message.h> /* for error codes */
#include <kern/counters.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/thread.h>
#include <kern/sched_prim.h>
#include <vm/vm_map.h>
diff --git a/vm/vm_kern.c b/vm/vm_kern.c
index ed81f0a..786daaa 100644
--- a/vm/vm_kern.c
+++ b/vm/vm_kern.c
@@ -39,6 +39,7 @@
#include <mach/kern_return.h>
#include <machine/vm_param.h>
#include <kern/assert.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/lock.h>
#include <kern/thread.h>
#include <vm/vm_fault.h>
diff --git a/vm/vm_map.c b/vm/vm_map.c
index 71de048..31ef042 100644
--- a/vm/vm_map.c
+++ b/vm/vm_map.c
@@ -34,12 +34,13 @@
* Virtual memory mapping module.
*/
-#include <printf.h>
+#include <kern/printf.h>
#include <mach/kern_return.h>
#include <mach/port.h>
#include <mach/vm_attributes.h>
#include <mach/vm_param.h>
#include <kern/assert.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/zalloc.h>
#include <vm/vm_fault.h>
#include <vm/vm_map.h>
diff --git a/vm/vm_object.c b/vm/vm_object.c
index 0e8a514..a52edaf 100644
--- a/vm/vm_object.c
+++ b/vm/vm_object.c
@@ -33,7 +33,7 @@
* Virtual memory object module.
*/
-#include <printf.h>
+#include <kern/printf.h>
#include <string.h>
#include <mach/memory_object.h>
@@ -43,6 +43,7 @@
#include <ipc/ipc_port.h>
#include <ipc/ipc_space.h>
#include <kern/assert.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/lock.h>
#include <kern/queue.h>
#include <kern/xpr.h>
diff --git a/vm/vm_object.h b/vm/vm_object.h
index 84e658f..05dce54 100644
--- a/vm/vm_object.h
+++ b/vm/vm_object.h
@@ -43,6 +43,7 @@
#include <kern/queue.h>
#include <kern/lock.h>
#include <kern/assert.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/macro_help.h>
#include <vm/pmap.h>
diff --git a/vm/vm_pageout.c b/vm/vm_pageout.c
index c3d890c..63ee8f0 100644
--- a/vm/vm_pageout.c
+++ b/vm/vm_pageout.c
@@ -41,6 +41,7 @@
#include <mach/vm_param.h>
#include <mach/vm_statistics.h>
#include <kern/counters.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/thread.h>
#include <vm/pmap.h>
#include <vm/vm_map.h>
diff --git a/vm/vm_resident.c b/vm/vm_resident.c
index 2b5ecee..8eb5c85 100644
--- a/vm/vm_resident.c
+++ b/vm/vm_resident.c
@@ -33,11 +33,12 @@
* Resident memory management module.
*/
-#include <printf.h>
+#include <kern/printf.h>
#include <string.h>
#include <mach/vm_prot.h>
#include <kern/counters.h>
+#include <kern/debug.h> /* for panic() */
#include <kern/sched_prim.h>
#include <kern/task.h>
#include <kern/thread.h>