blk: rq_data_dir() should not return a boolean
[cris-mirror.git] / arch / um / kernel / skas / process.c
blob527fa5881915cea2d5c78a847b804ca7f4459597
1 /*
2 * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL
4 */
6 #include <linux/init.h>
7 #include <linux/sched.h>
8 #include <as-layout.h>
9 #include <kern.h>
10 #include <os.h>
11 #include <skas.h>
13 extern void start_kernel(void);
15 static int __init start_kernel_proc(void *unused)
17 int pid;
19 block_signals();
20 pid = os_getpid();
22 cpu_tasks[0].pid = pid;
23 cpu_tasks[0].task = current;
25 start_kernel();
26 return 0;
29 extern int userspace_pid[];
31 extern char cpu0_irqstack[];
33 int __init start_uml(void)
35 stack_protections((unsigned long) &cpu0_irqstack);
36 set_sigstack(cpu0_irqstack, THREAD_SIZE);
38 init_new_thread_signals();
40 init_task.thread.request.u.thread.proc = start_kernel_proc;
41 init_task.thread.request.u.thread.arg = NULL;
42 return start_idle_thread(task_stack_page(&init_task),
43 &init_task.thread.switch_buf);
46 unsigned long current_stub_stack(void)
48 if (current->mm == NULL)
49 return 0;
51 return current->mm->context.id.stack;