From 3e148c4099b50d92de31664c594d2eb4b84e63f6 Mon Sep 17 00:00:00 2001 From: Eivind Eklund Date: Sun, 26 Sep 1999 18:19:49 +0000 Subject: [PATCH] Move the declaration of panic() from sys/systm.h to sys/param.h. Rationale: Wider access, so we can add assertions to header files. panicstr is still in sys/systm.h Suggested by: phk Discussed with: peter --- sys/dev/advansys/adwlib.c | 2 +- sys/i386/i386/mpapic.c | 2 +- sys/sys/param.h | 9 +++++++++ sys/sys/systm.h | 1 - 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/sys/dev/advansys/adwlib.c b/sys/dev/advansys/adwlib.c index 289c3c67b1ee..1195f503cfe2 100644 --- a/sys/dev/advansys/adwlib.c +++ b/sys/dev/advansys/adwlib.c @@ -44,7 +44,7 @@ * modification. */ -#include +#include #include #include diff --git a/sys/i386/i386/mpapic.c b/sys/i386/i386/mpapic.c index ef591aa7b51d..ee0a6b37b4ec 100644 --- a/sys/i386/i386/mpapic.c +++ b/sys/i386/i386/mpapic.c @@ -27,7 +27,7 @@ #include "opt_smp.h" -#include +#include #include #include /** TEST_TEST1 */ diff --git a/sys/sys/param.h b/sys/sys/param.h index ff68a0758f38..3ae239c48357 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -239,4 +239,13 @@ #define ctodb(db) /* calculates pages to devblks */ \ ((db) << (PAGE_SHIFT - DEV_BSHIFT)) + +/* + * Make this available for most of the kernel. There were too many + * things that included sys/systm.h just for panic(). + */ +#ifdef KERNEL +void panic __P((const char *, ...)) __dead2 __printflike(1, 2); +#endif + #endif /* _SYS_PARAM_H_ */ diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 9ed5a11fff6e..922b6fcce12f 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -101,7 +101,6 @@ int ureadc __P((int, struct uio *)); void *hashinit __P((int count, struct malloc_type *type, u_long *hashmask)); void *phashinit __P((int count, struct malloc_type *type, u_long *nentries)); -void panic __P((const char *, ...)) __dead2 __printflike(1, 2); void cpu_boot __P((int)); void cpu_rootconf __P((void)); void tablefull __P((const char *));