[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>
This commit is contained in:
committed by
Linus Torvalds
parent
6add9f7f52
commit
f6e34c6af6
@ -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)
|
||||
|
Reference in New Issue
Block a user