summaryrefslogtreecommitdiffstats
path: root/src/kernel/panic.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/panic.c')
-rw-r--r--src/kernel/panic.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/kernel/panic.c b/src/kernel/panic.c
new file mode 100644
index 0000000..9a40e45
--- /dev/null
+++ b/src/kernel/panic.c
@@ -0,0 +1,26 @@
1/*
2 * linux/kernel/panic.c
3 *
4 * (C) 1991 Linus Torvalds
5 */
6
7/*
8 * This function is used through-out the kernel (includeinh mm and fs)
9 * to indicate a major problem.
10 */
11#define PANIC
12
13#include <linux/kernel.h>
14#include <linux/sched.h>
15
16void sys_sync(void); /* it's really int */
17
18void panic(const char * s)
19{
20 printk("Kernel panic: %s\n\r",s);
21 if (current == task[0])
22 printk("In swapper task - not syncing\n\r");
23 else
24 sys_sync();
25 for(;;);
26}