From f025f685e965ac9ee1cd35ff3636c8554d9939d2 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Sat, 1 Oct 2016 13:25:22 +0200 Subject: kern: Improve assertions and panics. * kern/assert.h (Assert): Add function argument. (assert): Supply function argument. * kern/debug.c (Assert): Add function argument. Unify message format. (panic): Rename to 'Panic', add location information. * kern/debug.h (panic): Rename, and add a macro version that supplies the location. * linux/dev/include/linux/kernel.h: Use the new panic macro. --- linux/dev/include/linux/kernel.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'linux') diff --git a/linux/dev/include/linux/kernel.h b/linux/dev/include/linux/kernel.h index 4db76acc..9c60b413 100644 --- a/linux/dev/include/linux/kernel.h +++ b/linux/dev/include/linux/kernel.h @@ -32,8 +32,10 @@ # define NORET_AND noreturn, extern void math_error(void); -NORET_TYPE void panic(const char * fmt, ...) - __attribute__ ((NORET_AND format (printf, 1, 2))); + +/* Use Mach's panic. */ +#include + NORET_TYPE void do_exit(long error_code) ATTRIB_NORET; extern unsigned long simple_strtoul(const char *,char **,unsigned int); -- cgit v1.2.3