예제 #1
0
파일: pm.c 프로젝트: AdamRLukaitis/prex
static int
pm_reboot(void)
{

    DPRINTF(("pm: rebooting...\n"));

    pm_stop_timer();
    device_broadcast(DEVCTL_PM_POWERDOWN, NULL, 1);
    driver_shutdown();
    machine_powerdown(PWR_REBOOT);

    /* NOTREACHED */
    return 0;
}
예제 #2
0
파일: main.c 프로젝트: Spenser309/CS551
/*===========================================================================*
 *		           sef_cb_signal_handler                             *
 *===========================================================================*/
PRIVATE void sef_cb_signal_handler(int signo)
{
	/* Only check for termination signal, ignore anything else. */
	if (signo != SIGTERM) return;

	/* If so, shut down this driver. */
#if DEBUG
	printf("Filter: shutdown...\n");
#endif

	driver_shutdown();

	exit(0);
}
예제 #3
0
파일: pm.c 프로젝트: AdamRLukaitis/prex
static int
pm_poweroff(void)
{

    DPRINTF(("pm: power off...\n"));

    pm_stop_timer();
    device_broadcast(DEVCTL_PM_POWERDOWN, NULL, 1);
    driver_shutdown();

#ifdef CONFIG_CONS
    cons_puts("\nThe system is halted. You can turn off power.");
#endif
    machine_powerdown(PWR_OFF);

    /* NOTREACHED */
    return 0;
}