This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / include / asm-i386 / tracehook.h
1 /*
2  * Tracing hooks, i386 CPU support
3  */
4
5 #ifndef _ASM_TRACEHOOK_H
6 #define _ASM_TRACEHOOK_H        1
7
8 #include <linux/sched.h>
9 #include <asm/ptrace.h>
10
11 /*
12  * See linux/tracehook.h for the descriptions of what these need to do.
13  */
14
15 #define ARCH_HAS_SINGLE_STEP    (1)
16
17 /* These two are defined in arch/i386/kernel/ptrace.c.  */
18 void tracehook_enable_single_step(struct task_struct *tsk);
19 void tracehook_disable_single_step(struct task_struct *tsk);
20
21 static inline int tracehook_single_step_enabled(struct task_struct *tsk)
22 {
23         return test_tsk_thread_flag(tsk, TIF_SINGLESTEP);
24 }
25
26 static inline void tracehook_enable_syscall_trace(struct task_struct *tsk)
27 {
28         set_tsk_thread_flag(tsk, TIF_SYSCALL_TRACE);
29 }
30
31 static inline void tracehook_disable_syscall_trace(struct task_struct *tsk)
32 {
33         clear_tsk_thread_flag(tsk, TIF_SYSCALL_TRACE);
34 }
35
36 static inline void tracehook_abort_syscall(struct pt_regs *regs)
37 {
38         regs->orig_eax = -1;
39 }
40
41 extern const struct utrace_regset_view utrace_i386_native;
42 static inline const struct utrace_regset_view *
43 utrace_native_view(struct task_struct *tsk)
44 {
45         return &utrace_i386_native;
46 }
47
48
49 #endif