文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>panic.c

panic.c

时间:2009-08-05  来源:jhluroom

/*
 * 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 int sys_sync(void)*/

volatile void panic(const char * s)//用于显示系统内核错误,并使系统进入死循环(死机),volatile说明本函数无参数返回

{
    printk("Kernel panic: %s\n\r",s);
    if (current == task[0])//如果是任务0的话,是空闲进程,不会修改内核数据,和文件系统没有瓜葛,所以不用调用sys_sync

        printk("In swapper task - not syncing\n\r");
    else
        sys_sync();//系统同步

    for(;;);//进入死循环(死机)

}

相关阅读 更多 +
排行榜 更多 +
荒岛狩猎人神枪手

荒岛狩猎人神枪手

飞行射击 下载
斗弓箭手

斗弓箭手

飞行射击 下载
王牌最强射击手

王牌最强射击手

飞行射击 下载