#include <linux/kernel.h>
#include <linux/sched.h>
void sys_sync(void);
死机,内核出现重大错误
volatile void panic(const char * s)
{
printk("Kernel panic: %s/n/r",s);
如果当前进程是第一个进程,是不能死机的
if (current == task[0])
printk("In swapper task - not syncing/n/r");
else
文件系统同步函数
sys_sync();
在这里死循环
for(;;);
}