x86/boot: Rename overlapping memcpy() to memmove()
[linux/fpc-iii.git] / arch / unicore32 / include / asm / switch_to.h
blob39572d2bd6929db26eb855be6857265db7e38cc7
1 /*
2 * Task switching for PKUnity SoC and UniCore ISA
4 * Copyright (C) 2001-2012 GUAN Xue-tao
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10 #ifndef __UNICORE_SWITCH_TO_H__
11 #define __UNICORE_SWITCH_TO_H__
13 struct task_struct;
14 struct thread_info;
17 * switch_to(prev, next) should switch from task `prev' to `next'
18 * `prev' will never be the same as `next'. schedule() itself
19 * contains the memory barrier to tell GCC not to cache `current'.
21 extern struct task_struct *__switch_to(struct task_struct *,
22 struct thread_info *, struct thread_info *);
24 #define switch_to(prev, next, last) \
25 do { \
26 last = __switch_to(prev, task_thread_info(prev), \
27 task_thread_info(next)); \
28 } while (0)
30 #endif /* __UNICORE_SWITCH_TO_H__ */