panic.c

来自「linux0.11经典学习代码,其系统架构与目前2.6的版本极其相似,代码量少,」· C语言 代码 · 共 25 行

C
25
字号
/* *  linux/kernel/panic.c * *  (C) 1991  Linus Torvalds *//* * This function is used through-out the kernel (includeinh mm and fs) * to indicate a major problem. */#include <linux/kernel.h>#include <linux/sched.h>void sys_sync(void);	/* it's really int */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(;;);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?