summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2016-10-01 13:25:22 +0200
committerJustus Winter <justus@gnupg.org>2016-10-01 15:51:26 +0200
commitf025f685e965ac9ee1cd35ff3636c8554d9939d2 (patch)
treedc5126b12ed850de99875272f112d0e2b0a11243 /linux
parentc81df8d61ed024b253334076041917b2c8fcf55e (diff)
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.
Diffstat (limited to 'linux')
-rw-r--r--linux/dev/include/linux/kernel.h6
1 files changed, 4 insertions, 2 deletions
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 <kern/debug.h>
+
NORET_TYPE void do_exit(long error_code)
ATTRIB_NORET;
extern unsigned long simple_strtoul(const char *,char **,unsigned int);