fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / include / asm-sparc64 / tracehook.h
1 /*
2  * Tracing hooks, SPARC64 CPU support
3  *
4  * Copyright (C) 2006, 2007 Red Hat, Inc.  All rights reserved.
5  *
6  * This copyrighted material is made available to anyone wishing to use,
7  * modify, copy, or redistribute it subject to the terms and conditions
8  * of the GNU General Public License v.2.
9  *
10  * Red Hat Author: Roland McGrath.
11  */
12
13 #ifndef _ASM_TRACEHOOK_H
14 #define _ASM_TRACEHOOK_H        1
15
16
17 #include <linux/sched.h>
18 #include <asm/ptrace.h>
19
20 /*
21  * See linux/tracehook.h for the descriptions of what these need to do.
22  */
23
24
25 static inline void tracehook_enable_syscall_trace(struct task_struct *tsk)
26 {
27         set_tsk_thread_flag(tsk, TIF_SYSCALL_TRACE);
28 }
29
30 static inline void tracehook_disable_syscall_trace(struct task_struct *tsk)
31 {
32         clear_tsk_thread_flag(tsk, TIF_SYSCALL_TRACE);
33 }
34
35 static inline void tracehook_abort_syscall(struct pt_regs *regs)
36 {
37         regs->u_regs[UREG_G1] = -1L;
38 }
39
40 extern const struct utrace_regset_view utrace_sparc64_native_view;
41 static inline const struct utrace_regset_view *
42 utrace_native_view(struct task_struct *tsk)
43 {
44 #ifdef CONFIG_COMPAT
45         extern const struct utrace_regset_view utrace_sparc32_view;
46         if (test_tsk_thread_flag(tsk, TIF_32BIT))
47                 return &utrace_sparc32_view;
48 #endif
49         return &utrace_sparc64_native_view;
50 }
51
52 #endif