Linux 5.7.6
[linux/fpc-iii.git] / arch / unicore32 / include / asm / switch_to.h
blob12e534b3bfa5e3acc977488f41bcf04045dc7ce9
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Task switching for PKUnity SoC and UniCore ISA
5 * Copyright (C) 2001-2012 GUAN Xue-tao
6 */
7 #ifndef __UNICORE_SWITCH_TO_H__
8 #define __UNICORE_SWITCH_TO_H__
10 struct task_struct;
11 struct thread_info;
14 * switch_to(prev, next) should switch from task `prev' to `next'
15 * `prev' will never be the same as `next'. schedule() itself
16 * contains the memory barrier to tell GCC not to cache `current'.
18 extern struct task_struct *__switch_to(struct task_struct *,
19 struct thread_info *, struct thread_info *);
21 #define switch_to(prev, next, last) \
22 do { \
23 last = __switch_to(prev, task_thread_info(prev), \
24 task_thread_info(next)); \
25 } while (0)
27 #endif /* __UNICORE_SWITCH_TO_H__ */