2 * Copyright (C) 2000, 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
6 #include "linux/module.h"
7 #include "linux/sched.h"
13 #include "choose-mode.h"
15 void (*pm_power_off
)(void);
18 static void kill_idlers(int me
)
21 struct task_struct
*p
;
24 for(i
= 0; i
< ARRAY_SIZE(idle_threads
); i
++){
26 if((p
!= NULL
) && (p
->thread
.mode
.tt
.extern_pid
!= me
))
27 os_kill_process(p
->thread
.mode
.tt
.extern_pid
, 0);
33 static void kill_off_processes(void)
35 CHOOSE_MODE(kill_off_processes_tt(), kill_off_processes_skas());
37 kill_idlers(os_getpid());
41 void uml_cleanup(void)
48 void machine_restart(char * __unused
)
51 CHOOSE_MODE(reboot_tt(), reboot_skas());
54 void machine_power_off(void)
57 CHOOSE_MODE(halt_tt(), halt_skas());
60 void machine_halt(void)