switch_to.h 582 B

12345678910111213141516171819
  1. #ifndef __ASM_ARM_SWITCH_TO_H
  2. #define __ASM_ARM_SWITCH_TO_H
  3. #include <linux/thread_info.h>
  4. /*
  5. * switch_to(prev, next) should switch from task `prev' to `next'
  6. * `prev' will never be the same as `next'. schedule() itself
  7. * contains the memory barrier to tell GCC not to cache `current'.
  8. */
  9. extern struct task_struct *__switch_to(struct task_struct *, struct thread_info *, struct thread_info *);
  10. #define switch_to(prev,next,last) \
  11. do { \
  12. last = __switch_to(prev,task_thread_info(prev), task_thread_info(next)); \
  13. } while (0)
  14. #endif /* __ASM_ARM_SWITCH_TO_H */