1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Task switching for PKUnity SoC and UniCore ISA
5 * Copyright (C) 2001-2012 GUAN Xue-tao
7 #ifndef __UNICORE_SWITCH_TO_H__
8 #define __UNICORE_SWITCH_TO_H__
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) \
23 last = __switch_to(prev, task_thread_info(prev), \
24 task_thread_info(next)); \
27 #endif /* __UNICORE_SWITCH_TO_H__ */