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
new->thread.regs->msr |= MSR_VEC;
new_thread = &new->thread;
old_thread = ¤t->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)
extern void note_scsi_host(struct device_node *, void *);
struct task_struct;
-extern void __switch_to(struct task_struct *, struct task_struct *);
-#define switch_to(prev, next, last) __switch_to((prev), (next))
+extern struct task_struct *__switch_to(struct task_struct *,
+ struct task_struct *);
+#define switch_to(prev, next, last) ((last) = __switch_to((prev), (next)))
struct thread_struct;
extern struct task_struct *_switch(struct thread_struct *prev,