1
2
3
4
5
6
7
8 #ifndef _ASM_C6X_SWITCH_TO_H
9 #define _ASM_C6X_SWITCH_TO_H
10
11 #include <linux/linkage.h>
12
13 #define prepare_to_switch() do { } while (0)
14
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);
20
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)
29
30 #endif