This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / include / asm-s390 / tracehook.h
1 /*
2  * Tracing hooks, s390/s390x 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 three are defined in arch/s390/kernel/ptrace.c.  */
18 void tracehook_enable_single_step(struct task_struct *tsk);
19 void tracehook_disable_single_step(struct task_struct *tsk);
20 int tracehook_single_step_enabled(struct task_struct *tsk);
21
22
23 static inline void tracehook_enable_syscall_trace(struct task_struct *tsk)
24 {
25         set_tsk_thread_flag(tsk, TIF_SYSCALL_TRACE);
26 }
27
28 static inline void tracehook_disable_syscall_trace(struct task_struct *tsk)
29 {
30         clear_tsk_thread_flag(tsk, TIF_SYSCALL_TRACE);
31 }
32
33 static inline void tracehook_abort_syscall(struct pt_regs *regs)
34 {
35         regs->gprs[2] = -1L;
36 }
37
38
39 extern const struct utrace_regset_view utrace_s390_native_view;
40 static inline const struct utrace_regset_view *
41 utrace_native_view(struct task_struct *tsk)
42 {
43 #ifdef CONFIG_COMPAT
44         extern const struct utrace_regset_view utrace_s390_compat_view;
45
46         if (test_tsk_thread_flag(tsk, TIF_31BIT))
47                 return &utrace_s390_compat_view;
48 #endif
49         return &utrace_s390_native_view;
50 }
51
52
53 #endif