2012-11-27 18:33:25 +00:00
|
|
|
#ifndef _ASM_X86_CONTEXT_TRACKING_H
|
|
|
|
#define _ASM_X86_CONTEXT_TRACKING_H
|
2012-07-11 18:26:35 +00:00
|
|
|
|
2012-07-11 18:26:38 +00:00
|
|
|
#ifndef __ASSEMBLY__
|
2012-11-27 18:33:25 +00:00
|
|
|
#include <linux/context_tracking.h>
|
2012-07-11 18:26:35 +00:00
|
|
|
#include <asm/ptrace.h>
|
|
|
|
|
|
|
|
static inline void exception_enter(struct pt_regs *regs)
|
|
|
|
{
|
2012-11-27 18:33:25 +00:00
|
|
|
user_exit();
|
2012-07-11 18:26:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline void exception_exit(struct pt_regs *regs)
|
|
|
|
{
|
2012-11-27 18:33:25 +00:00
|
|
|
#ifdef CONFIG_CONTEXT_TRACKING
|
2012-07-11 18:26:35 +00:00
|
|
|
if (user_mode(regs))
|
2012-11-27 18:33:25 +00:00
|
|
|
user_enter();
|
2012-07-11 18:26:35 +00:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2012-07-11 18:26:38 +00:00
|
|
|
#else /* __ASSEMBLY__ */
|
|
|
|
|
2012-11-27 18:33:25 +00:00
|
|
|
#ifdef CONFIG_CONTEXT_TRACKING
|
2012-07-11 18:26:38 +00:00
|
|
|
# define SCHEDULE_USER call schedule_user
|
|
|
|
#else
|
|
|
|
# define SCHEDULE_USER call schedule
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* !__ASSEMBLY__ */
|
|
|
|
|
2012-07-11 18:26:35 +00:00
|
|
|
#endif
|