Commit 76b278ed authored by Richard Weinberger's avatar Richard Weinberger

um: Use asm-generic/switch_to.h

Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent a3a85a76
generic-y += bug.h cputime.h device.h emergency-restart.h futex.h hardirq.h generic-y += bug.h cputime.h device.h emergency-restart.h futex.h hardirq.h
generic-y += hw_irq.h irq_regs.h kdebug.h percpu.h sections.h topology.h xor.h generic-y += hw_irq.h irq_regs.h kdebug.h percpu.h sections.h topology.h xor.h
generic-y += ftrace.h pci.h io.h param.h delay.h mutex.h current.h exec.h generic-y += ftrace.h pci.h io.h param.h delay.h mutex.h current.h exec.h
generic-y += switch_to.h
...@@ -88,11 +88,8 @@ static inline void set_current(struct task_struct *task) ...@@ -88,11 +88,8 @@ static inline void set_current(struct task_struct *task)
extern void arch_switch_to(struct task_struct *to); extern void arch_switch_to(struct task_struct *to);
void *_switch_to(void *prev, void *next, void *last) void *__switch_to(struct task_struct *from, struct task_struct *to)
{ {
struct task_struct *from = prev;
struct task_struct *to = next;
to->thread.prev_sched = from; to->thread.prev_sched = from;
set_current(to); set_current(to);
...@@ -111,7 +108,6 @@ void *_switch_to(void *prev, void *next, void *last) ...@@ -111,7 +108,6 @@ void *_switch_to(void *prev, void *next, void *last)
} while (current->thread.saved_task); } while (current->thread.saved_task);
return current->thread.prev_sched; return current->thread.prev_sched;
} }
void interrupt_end(void) void interrupt_end(void)
......
#ifndef _ASM_UM_SWITCH_TO_H_
#define _ASM_UM_SWITCH_TO_H_
extern void *_switch_to(void *prev, void *next, void *last);
#define switch_to(prev, next, last) prev = _switch_to(prev, next, last)
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment