aboutsummaryrefslogtreecommitdiff
path: root/arch/um/kernel/process_kern.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/kernel/process_kern.c')
-rw-r--r--arch/um/kernel/process_kern.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/arch/um/kernel/process_kern.c b/arch/um/kernel/process_kern.c
index c23d8a08d0f..39cf568ccfa 100644
--- a/arch/um/kernel/process_kern.c
+++ b/arch/um/kernel/process_kern.c
@@ -113,8 +113,23 @@ 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);
+
+ do {
+ current->thread.saved_task = NULL ;
+ CHOOSE_MODE_PROC(switch_to_tt, switch_to_skas, prev, next);
+ if(current->thread.saved_task)
+ show_regs(&(current->thread.regs));
+ next= current->thread.saved_task;
+ prev= current;
+ } while(current->thread.saved_task);
+
+ return(current->thread.prev_sched);
+
}
void interrupt_end(void)