Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
switch_to.h File Reference
#include <asm/barrier.h>

Go to the source code of this file.

Macros

#define switch_fpu(prev, next)
 
#define switch_to(prev, next, last)
 

Functions

asmlinkage void fpu_save (struct fpu_state_struct *)
 
asmlinkage struct task_struct__switch_to (struct thread_struct *prev, struct thread_struct *next, struct task_struct *prev_task)
 

Macro Definition Documentation

#define switch_fpu (   prev,
  next 
)
Value:
do { \
if ((prev)->thread.fpu_flags & THREAD_HAS_FPU) { \
(prev)->thread.fpu_flags &= ~THREAD_HAS_FPU; \
(prev)->thread.uregs->epsw &= ~EPSW_FE; \
fpu_save(&(prev)->thread.fpu_state); \
} \
} while (0)

Definition at line 22 of file switch_to.h.

#define switch_to (   prev,
  next,
  last 
)
Value:
do { \
switch_fpu(prev, next); \
current->thread.wchan = (u_long) __builtin_return_address(0); \
(last) = __switch_to(&(prev)->thread, &(next)->thread, (prev)); \
mb(); \
current->thread.wchan = 0; \
} while (0)

Definition at line 40 of file switch_to.h.

Function Documentation

asmlinkage struct task_struct* __switch_to ( struct thread_struct prev,
struct thread_struct next,
struct task_struct prev_task 
)
read