context_tracking.h 553 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef _ASM_X86_CONTEXT_TRACKING_H
  2. #define _ASM_X86_CONTEXT_TRACKING_H
  3. #ifndef __ASSEMBLY__
  4. #include <linux/context_tracking.h>
  5. #include <asm/ptrace.h>
  6. static inline void exception_enter(struct pt_regs *regs)
  7. {
  8. user_exit();
  9. }
  10. static inline void exception_exit(struct pt_regs *regs)
  11. {
  12. #ifdef CONFIG_CONTEXT_TRACKING
  13. if (user_mode(regs))
  14. user_enter();
  15. #endif
  16. }
  17. #else /* __ASSEMBLY__ */
  18. #ifdef CONFIG_CONTEXT_TRACKING
  19. # define SCHEDULE_USER call schedule_user
  20. #else
  21. # define SCHEDULE_USER call schedule
  22. #endif
  23. #endif /* !__ASSEMBLY__ */
  24. #endif