1 /* 2 * linux/kernel/panic.c 3 * 4 * Copyright (C) 1991, 1992 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 #include <linux/kernel.h> 12 #include <linux/sched.h> 13 14 void sys_sync(void); /* it's really int */ 15 16 volatile void panic(const char * s) /* */ 17 { 18 printk("Kernel panic: %s\n",s); 19 if (current == task[0]) 20 printk("In swapper task - not syncing\n"); 21 else 22 sys_sync(); 23 for(;;); 24 }