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"
10 #include "kern_util.h"
14 #include "choose-mode.h"
16 void (*pm_power_off
)(void);
19 static void kill_idlers(int me
)
22 struct task_struct
*p
;
25 for(i
= 0; i
< ARRAY_SIZE(idle_threads
); i
++){
27 if((p
!= NULL
) && (p
->thread
.mode
.tt
.extern_pid
!= me
))
28 os_kill_process(p
->thread
.mode
.tt
.extern_pid
, 0);
34 static void kill_off_processes(void)
36 CHOOSE_MODE(kill_off_processes_tt(), kill_off_processes_skas());
38 kill_idlers(os_getpid());
42 void uml_cleanup(void)
49 void machine_restart(char * __unused
)
52 CHOOSE_MODE(reboot_tt(), reboot_skas());
55 void machine_power_off(void)
58 CHOOSE_MODE(halt_tt(), halt_skas());
61 void machine_halt(void)