diff options
author | Gennady Sharapov <Gennady.V.Sharapov@intel.com> | 2006-01-18 20:42:46 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-18 22:20:19 -0500 |
commit | abaf69773d8dda98b917d94c07757f6520da7bec (patch) | |
tree | 1000669c13511044d1f545cff6af26c1b1d946fb /arch/um/kernel/skas/process_kern.c | |
parent | f45d9fc9d80678c2ee22c578e503055207c46fd0 (diff) |
[PATCH] uml: move libc-dependent skas process handling
The serial UML OS-abstraction layer patch (um/kernel/skas dir).
This moves all systemcalls from skas/process.c file under os-Linux dir and
join skas/process.c and skas/process_kern.c files.
Signed-off-by: Gennady Sharapov <gennady.v.sharapov@intel.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/kernel/skas/process_kern.c')
-rw-r--r-- | arch/um/kernel/skas/process_kern.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/arch/um/kernel/skas/process_kern.c b/arch/um/kernel/skas/process_kern.c index a340006dec47..3f70a2e12f06 100644 --- a/arch/um/kernel/skas/process_kern.c +++ b/arch/um/kernel/skas/process_kern.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) | 2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) |
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
@@ -32,7 +32,7 @@ void switch_to_skas(void *prev, void *next) | |||
32 | if(current->pid == 0) | 32 | if(current->pid == 0) |
33 | switch_timers(0); | 33 | switch_timers(0); |
34 | 34 | ||
35 | switch_threads(&from->thread.mode.skas.switch_buf, | 35 | switch_threads(&from->thread.mode.skas.switch_buf, |
36 | to->thread.mode.skas.switch_buf); | 36 | to->thread.mode.skas.switch_buf); |
37 | 37 | ||
38 | if(current->pid == 0) | 38 | if(current->pid == 0) |
@@ -48,8 +48,8 @@ void new_thread_handler(int sig) | |||
48 | 48 | ||
49 | fn = current->thread.request.u.thread.proc; | 49 | fn = current->thread.request.u.thread.proc; |
50 | arg = current->thread.request.u.thread.arg; | 50 | arg = current->thread.request.u.thread.arg; |
51 | change_sig(SIGUSR1, 1); | 51 | os_usr1_signal(1); |
52 | thread_wait(¤t->thread.mode.skas.switch_buf, | 52 | thread_wait(¤t->thread.mode.skas.switch_buf, |
53 | current->thread.mode.skas.fork_buf); | 53 | current->thread.mode.skas.fork_buf); |
54 | 54 | ||
55 | if(current->thread.prev_sched != NULL) | 55 | if(current->thread.prev_sched != NULL) |
@@ -80,8 +80,8 @@ void release_thread_skas(struct task_struct *task) | |||
80 | 80 | ||
81 | void fork_handler(int sig) | 81 | void fork_handler(int sig) |
82 | { | 82 | { |
83 | change_sig(SIGUSR1, 1); | 83 | os_usr1_signal(1); |
84 | thread_wait(¤t->thread.mode.skas.switch_buf, | 84 | thread_wait(¤t->thread.mode.skas.switch_buf, |
85 | current->thread.mode.skas.fork_buf); | 85 | current->thread.mode.skas.fork_buf); |
86 | 86 | ||
87 | force_flush_all(); | 87 | force_flush_all(); |
@@ -91,13 +91,13 @@ void fork_handler(int sig) | |||
91 | schedule_tail(current->thread.prev_sched); | 91 | schedule_tail(current->thread.prev_sched); |
92 | current->thread.prev_sched = NULL; | 92 | current->thread.prev_sched = NULL; |
93 | 93 | ||
94 | /* Handle any immediate reschedules or signals */ | 94 | /* Handle any immediate reschedules or signals */ |
95 | interrupt_end(); | 95 | interrupt_end(); |
96 | userspace(¤t->thread.regs.regs); | 96 | userspace(¤t->thread.regs.regs); |
97 | } | 97 | } |
98 | 98 | ||
99 | int copy_thread_skas(int nr, unsigned long clone_flags, unsigned long sp, | 99 | int copy_thread_skas(int nr, unsigned long clone_flags, unsigned long sp, |
100 | unsigned long stack_top, struct task_struct * p, | 100 | unsigned long stack_top, struct task_struct * p, |
101 | struct pt_regs *regs) | 101 | struct pt_regs *regs) |
102 | { | 102 | { |
103 | void (*handler)(int); | 103 | void (*handler)(int); |
@@ -121,8 +121,6 @@ int copy_thread_skas(int nr, unsigned long clone_flags, unsigned long sp, | |||
121 | return(0); | 121 | return(0); |
122 | } | 122 | } |
123 | 123 | ||
124 | extern void map_stub_pages(int fd, unsigned long code, | ||
125 | unsigned long data, unsigned long stack); | ||
126 | int new_mm(unsigned long stack) | 124 | int new_mm(unsigned long stack) |
127 | { | 125 | { |
128 | int fd; | 126 | int fd; |