GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / arch / um / kernel / reboot.c
blob28750c0b4928ee3554a67e1955e9ae7d0dc4a926
1 /*
2 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL
4 */
6 #include "linux/sched.h"
7 #include "linux/slab.h"
8 #include "kern_util.h"
9 #include "os.h"
10 #include "skas.h"
12 void (*pm_power_off)(void);
14 static void kill_off_processes(void)
16 if (proc_mm)
17 os_kill_ptraced_process(userspace_pid[0], 1);
18 else {
19 struct task_struct *p;
20 int pid, me;
22 me = os_getpid();
23 for_each_process(p) {
24 if (p->mm == NULL)
25 continue;
27 pid = p->mm->context.id.u.pid;
28 os_kill_ptraced_process(pid, 1);
33 void uml_cleanup(void)
35 kmalloc_ok = 0;
36 do_uml_exitcalls();
37 kill_off_processes();
40 void machine_restart(char * __unused)
42 uml_cleanup();
43 reboot_skas();
46 void machine_power_off(void)
48 uml_cleanup();
49 halt_skas();
52 void machine_halt(void)
54 machine_power_off();