aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-um/ptrace-i386.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-um/ptrace-i386.h')
-rw-r--r--include/asm-um/ptrace-i386.h42
1 files changed, 14 insertions, 28 deletions
diff --git a/include/asm-um/ptrace-i386.h b/include/asm-um/ptrace-i386.h
index 6e2528bb0083..b2d24c5ea2c3 100644
--- a/include/asm-um/ptrace-i386.h
+++ b/include/asm-um/ptrace-i386.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) 2 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
@@ -9,10 +9,9 @@
9#define HOST_AUDIT_ARCH AUDIT_ARCH_I386 9#define HOST_AUDIT_ARCH AUDIT_ARCH_I386
10 10
11#include "linux/compiler.h" 11#include "linux/compiler.h"
12#include "sysdep/ptrace.h"
13#include "asm/ptrace-generic.h" 12#include "asm/ptrace-generic.h"
14#include "asm/host_ldt.h" 13#include <asm/user.h>
15#include "choose-mode.h" 14#include "sysdep/ptrace.h"
16 15
17#define PT_REGS_EAX(r) UPT_EAX(&(r)->regs) 16#define PT_REGS_EAX(r) UPT_EAX(&(r)->regs)
18#define PT_REGS_EBX(r) UPT_EBX(&(r)->regs) 17#define PT_REGS_EBX(r) UPT_EBX(&(r)->regs)
@@ -41,34 +40,21 @@
41 40
42#define user_mode(r) UPT_IS_USER(&(r)->regs) 41#define user_mode(r) UPT_IS_USER(&(r)->regs)
43 42
43/*
44 * Forward declaration to avoid including sysdep/tls.h, which causes a
45 * circular include, and compilation failures.
46 */
47struct user_desc;
48
49extern int get_fpxregs(struct user_fxsr_struct __user *buf,
50 struct task_struct *child);
51extern int set_fpxregs(struct user_fxsr_struct __user *buf,
52 struct task_struct *tsk);
53
44extern int ptrace_get_thread_area(struct task_struct *child, int idx, 54extern int ptrace_get_thread_area(struct task_struct *child, int idx,
45 struct user_desc __user *user_desc); 55 struct user_desc __user *user_desc);
46 56
47extern int ptrace_set_thread_area(struct task_struct *child, int idx, 57extern int ptrace_set_thread_area(struct task_struct *child, int idx,
48 struct user_desc __user *user_desc); 58 struct user_desc __user *user_desc);
49 59
50extern int do_set_thread_area_skas(struct user_desc *info);
51extern int do_get_thread_area_skas(struct user_desc *info);
52
53extern int do_set_thread_area_tt(struct user_desc *info);
54extern int do_get_thread_area_tt(struct user_desc *info);
55
56extern int arch_switch_tls_skas(struct task_struct *from, struct task_struct *to);
57extern int arch_switch_tls_tt(struct task_struct *from, struct task_struct *to);
58
59extern void arch_switch_to_tt(struct task_struct *from, struct task_struct *to);
60extern void arch_switch_to_skas(struct task_struct *from, struct task_struct *to);
61
62static inline int do_get_thread_area(struct user_desc *info)
63{
64 return CHOOSE_MODE_PROC(do_get_thread_area_tt, do_get_thread_area_skas, info);
65}
66
67static inline int do_set_thread_area(struct user_desc *info)
68{
69 return CHOOSE_MODE_PROC(do_set_thread_area_tt, do_set_thread_area_skas, info);
70}
71
72struct task_struct;
73
74#endif 60#endif