WIP FPC-III support
[linux/fpc-iii.git] / arch / c6x / include / asm / switch_to.h
blob36c5332fadaed9c74753830b8d219c31ec56cf59
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Port on Texas Instruments TMS320C6x architecture
5 * Copyright (C) 2004, 2009, 2010, 2011 Texas Instruments Incorporated
6 * Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com)
7 */
8 #ifndef _ASM_C6X_SWITCH_TO_H
9 #define _ASM_C6X_SWITCH_TO_H
11 #include <linux/linkage.h>
13 #define prepare_to_switch() do { } while (0)
15 struct task_struct;
16 struct thread_struct;
17 asmlinkage void *__switch_to(struct thread_struct *prev,
18 struct thread_struct *next,
19 struct task_struct *tsk);
21 #define switch_to(prev, next, last) \
22 do { \
23 current->thread.wchan = (u_long) __builtin_return_address(0); \
24 (last) = __switch_to(&(prev)->thread, \
25 &(next)->thread, (prev)); \
26 mb(); \
27 current->thread.wchan = 0; \
28 } while (0)
30 #endif /* _ASM_C6X_SWITCH_TO_H */