root/kernel/panic.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. panic

   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 extern "C" void sys_sync(void); /* it's really int */
  15 
  16 volatile void panic(const char * s)
     /* [previous][next][first][last][top][bottom][index][help] */
  17 {
  18         extern int log_to_console;
  19 
  20         log_to_console = 1;
  21         printk("Kernel panic: %s\n",s);
  22         if (current == task[0])
  23                 printk("In swapper task - not syncing\n");
  24         else
  25                 sys_sync();
  26         for(;;);
  27 }

/* [previous][next][first][last][top][bottom][index][help] */