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.
10 #ifndef __UNICORE_SWITCH_TO_H__
11 #define __UNICORE_SWITCH_TO_H__
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) \
26 last = __switch_to(prev, task_thread_info(prev), \
27 task_thread_info(next)); \
30 #endif /* __UNICORE_SWITCH_TO_H__ */