diff options
Diffstat (limited to 'kern')
-rw-r--r-- | kern/act.c | 1 | ||||
-rw-r--r-- | kern/ast.c | 1 | ||||
-rw-r--r-- | kern/bootstrap.c | 3 | ||||
-rw-r--r-- | kern/debug.c | 6 | ||||
-rw-r--r-- | kern/debug.h | 3 | ||||
-rw-r--r-- | kern/eventcount.c | 3 | ||||
-rw-r--r-- | kern/exception.c | 1 | ||||
-rw-r--r-- | kern/host.c | 1 | ||||
-rw-r--r-- | kern/ipc_host.c | 1 | ||||
-rw-r--r-- | kern/ipc_kobject.c | 3 | ||||
-rw-r--r-- | kern/ipc_mig.c | 1 | ||||
-rw-r--r-- | kern/ipc_sched.c | 1 | ||||
-rw-r--r-- | kern/ipc_tt.c | 1 | ||||
-rw-r--r-- | kern/kalloc.c | 1 | ||||
-rw-r--r-- | kern/lock.c | 1 | ||||
-rw-r--r-- | kern/mach_clock.c | 1 | ||||
-rw-r--r-- | kern/machine.c | 1 | ||||
-rw-r--r-- | kern/pc_sample.c | 2 | ||||
-rw-r--r-- | kern/printf.c | 2 | ||||
-rw-r--r-- | kern/printf.h | 52 | ||||
-rw-r--r-- | kern/processor.c | 1 | ||||
-rw-r--r-- | kern/sched_prim.c | 3 | ||||
-rw-r--r-- | kern/server_loop.ch | 1 | ||||
-rw-r--r-- | kern/startup.c | 3 | ||||
-rw-r--r-- | kern/task.c | 1 | ||||
-rw-r--r-- | kern/thread.c | 3 | ||||
-rw-r--r-- | kern/thread_swap.c | 1 | ||||
-rw-r--r-- | kern/xpr.c | 1 | ||||
-rw-r--r-- | kern/zalloc.c | 3 |
29 files changed, 90 insertions, 13 deletions
@@ -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" @@ -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/kern/printf.h b/kern/printf.h new file mode 100644 index 0000000..f5930dc --- /dev/null +++ b/kern/printf.h @@ -0,0 +1,52 @@ +/* + * Header file for printf type functions. + * Copyright (C) 2006 Free Software Foundation. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* + * String handling functions. + * + */ + +#ifndef _MACH_SA_SYS_PRINTF_H_ +#define _MACH_SA_SYS_PRINTF_H_ + +#include <sys/types.h> +#include <stdarg.h> + +extern void printf_init (); + +extern void _doprnt (const char *fmt, + va_list *argp, + void (*putc)(char, vm_offset_t), + int radix, + vm_offset_t putc_arg); + +extern void printnum (unsigned long u, int base, + void (*putc)(char, vm_offset_t), + vm_offset_t putc_arg); + +extern int sprintf (char *buf, const char *fmt, ...); + +extern int printf (const char *fmt, ...); + +extern int indent; +extern void iprintf (const char *fmt, ...); + +extern int vprintf(const char *fmt, va_list listp); + +#endif /* _MACH_SA_SYS_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> @@ -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> |