summaryrefslogtreecommitdiff
path: root/arch/ppc/kernel
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2003-02-23 10:28:57 +1100
committerPaul Mackerras <paulus@samba.org>2003-02-23 10:28:57 +1100
commitaeffbd1b6416b5de4dcd18301ddac9c669a6bfa1 (patch)
tree2ddb040c5af54f9d8deb727ed729b59f4ba968ae /arch/ppc/kernel
parent5a983302652b8e949f4352fe98e8290a24d48b43 (diff)
PPC32: Make switch_to return the previous task in the `last' argument
Diffstat (limited to 'arch/ppc/kernel')
-rw-r--r--arch/ppc/kernel/process.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/ppc/kernel/process.c b/arch/ppc/kernel/process.c
index 0194e65053e9..803c73301b9d 100644
--- a/arch/ppc/kernel/process.c
+++ b/arch/ppc/kernel/process.c
@@ -197,10 +197,12 @@ dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpregs)
return 1;
}
-void __switch_to(struct task_struct *prev, struct task_struct *new)
+struct task_struct *__switch_to(struct task_struct *prev,
+ struct task_struct *new)
{
struct thread_struct *new_thread, *old_thread;
unsigned long s;
+ struct task_struct *last;
local_irq_save(s);
#if CHECK_STACK
@@ -244,8 +246,9 @@ void __switch_to(struct task_struct *prev, struct task_struct *new)
new->thread.regs->msr |= MSR_VEC;
new_thread = &new->thread;
old_thread = &current->thread;
- _switch(old_thread, new_thread);
+ last = _switch(old_thread, new_thread);
local_irq_restore(s);
+ return last;
}
void show_regs(struct pt_regs * regs)