linux 内核态重启接口

linux 内核态重启接口

  1. 头文件 <linux/reboot.h>
  2. 源文件 kernel/reboot.c
  3. 调用接口
/**
 * orderly_reboot - Trigger an orderly system reboot
 *
 * This may be called from any context to trigger a system reboot.
 * If the orderly reboot fails, it will force an immediate reboot.
 */
void orderly_reboot(void)
{
        schedule_work(&reboot_work);
}
EXPORT_SYMBOL_GPL(orderly_reboot);

  

posted @ 2021-12-28 14:41  Boks  阅读(391)  评论(0编辑  收藏  举报