This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / include / asm-sparc64 / tracehook.h
1 /*
2  * Tracing hooks, SPARC64 CPU support
3  */
4
5 #ifndef _ASM_TRACEHOOK_H
6 #define _ASM_TRACEHOOK_H        1
7
8
9 #include <linux/sched.h>
10 #include <asm/ptrace.h>
11
12 /*
13  * See linux/tracehook.h for the descriptions of what these need to do.
14  */
15
16
17 static inline void tracehook_enable_syscall_trace(struct task_struct *tsk)
18 {
19         set_tsk_thread_flag(tsk, TIF_SYSCALL_TRACE);
20 }
21
22 static inline void tracehook_disable_syscall_trace(struct task_struct *tsk)
23 {
24         clear_tsk_thread_flag(tsk, TIF_SYSCALL_TRACE);
25 }
26
27 static inline void tracehook_abort_syscall(struct pt_regs *regs)
28 {
29         regs->u_regs[UREG_G1] = -1L;
30 }
31
32 extern const struct utrace_regset_view utrace_sparc64_native_view;
33 static inline const struct utrace_regset_view *
34 utrace_native_view(struct task_struct *tsk)
35 {
36 #ifdef CONFIG_COMPAT
37         extern const struct utrace_regset_view utrace_sparc32_view;
38         if (test_tsk_thread_flag(tsk, TIF_32BIT))
39                 return &utrace_sparc32_view;
40 #endif
41         return &utrace_sparc64_native_view;
42 }
43
44 #endif