summaryrefslogtreecommitdiff
path: root/arch/um/kernel/process_kern.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2005-09-16 19:27:43 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-17 11:49:59 -0700
commitf6e34c6af6f18bd6c66bfb1c6a7c57068412aa73 (patch)
tree45aebccc135b870a5aff5dcf975325171c7bf891 /arch/um/kernel/process_kern.c
parent6add9f7f529b124938d14ae9db5a952d1272075a (diff)
[PATCH] uml: _switch_to code consolidation
This patch moves code that is in both switch_to_tt and switch_to_skas to the top level _switch_to function, keeping us from duplicating code. It is required for the stack trace patch to work properly. Signed-off-by: Allan Graves <allan.graves@gmail.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 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/process_kern.c')
-rw-r--r--arch/um/kernel/process_kern.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/um/kernel/process_kern.c b/arch/um/kernel/process_kern.c
index c23d8a08d0ff..1143f5e522b2 100644
--- a/arch/um/kernel/process_kern.c
+++ b/arch/um/kernel/process_kern.c
@@ -113,8 +113,16 @@ void set_current(void *t)
void *_switch_to(void *prev, void *next, void *last)
{
- return(CHOOSE_MODE(switch_to_tt(prev, next),
- switch_to_skas(prev, next)));
+ struct task_struct *from = prev;
+ struct task_struct *to= next;
+
+ to->thread.prev_sched = from;
+ set_current(to);
+
+ CHOOSE_MODE_PROC(switch_to_tt, switch_to_skas, prev, next);
+
+ return(current->thread.prev_sched);
+
}
void interrupt_end(void)