[IPV4]: Correct rp_filter help text.
[linux-2.6/verdex.git] / arch / um / kernel / reboot.c
blob7e4305a1fd3c648d91d397a240dde7e8ac659458
1 /*
2 * Copyright (C) 2000, 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
6 #include "linux/module.h"
7 #include "linux/sched.h"
8 #include "asm/smp.h"
9 #include "kern_util.h"
10 #include "kern.h"
11 #include "os.h"
12 #include "mode.h"
13 #include "choose-mode.h"
15 void (*pm_power_off)(void);
17 #ifdef CONFIG_SMP
18 static void kill_idlers(int me)
20 #ifdef CONFIG_MODE_TT
21 struct task_struct *p;
22 int i;
24 for(i = 0; i < ARRAY_SIZE(idle_threads); i++){
25 p = 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);
29 #endif
31 #endif
33 static void kill_off_processes(void)
35 CHOOSE_MODE(kill_off_processes_tt(), kill_off_processes_skas());
36 #ifdef CONFIG_SMP
37 kill_idlers(os_getpid());
38 #endif
41 void uml_cleanup(void)
43 kmalloc_ok = 0;
44 do_uml_exitcalls();
45 kill_off_processes();
48 void machine_restart(char * __unused)
50 uml_cleanup();
51 CHOOSE_MODE(reboot_tt(), reboot_skas());
54 void machine_power_off(void)
56 uml_cleanup();
57 CHOOSE_MODE(halt_tt(), halt_skas());
60 void machine_halt(void)
62 machine_power_off();