Go to the documentation of this file.
11 #ifndef _ASM_SWITCH_TO_H
12 #define _ASM_SWITCH_TO_H
14 #include <asm/barrier.h>
19 #if !defined(CONFIG_LAZY_SAVE_FPU)
22 #define switch_fpu(prev, next) \
24 if ((prev)->thread.fpu_flags & THREAD_HAS_FPU) { \
25 (prev)->thread.fpu_flags &= ~THREAD_HAS_FPU; \
26 (prev)->thread.uregs->epsw &= ~EPSW_FE; \
27 fpu_save(&(prev)->thread.fpu_state); \
31 #define switch_fpu(prev, next) do {} while (0)
40 #define switch_to(prev, next, last) \
42 switch_fpu(prev, next); \
43 current->thread.wchan = (u_long) __builtin_return_address(0); \
44 (last) = __switch_to(&(prev)->thread, &(next)->thread, (prev)); \
46 current->thread.wchan = 0; \