diff options
Diffstat (limited to 'include/asm-um/ptrace-i386.h')
-rw-r--r-- | include/asm-um/ptrace-i386.h | 44 |
1 files changed, 33 insertions, 11 deletions
diff --git a/include/asm-um/ptrace-i386.h b/include/asm-um/ptrace-i386.h index fe882b9d917e..6e2528bb0083 100644 --- a/include/asm-um/ptrace-i386.h +++ b/include/asm-um/ptrace-i386.h | |||
@@ -8,8 +8,11 @@ | |||
8 | 8 | ||
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 "sysdep/ptrace.h" | 12 | #include "sysdep/ptrace.h" |
12 | #include "asm/ptrace-generic.h" | 13 | #include "asm/ptrace-generic.h" |
14 | #include "asm/host_ldt.h" | ||
15 | #include "choose-mode.h" | ||
13 | 16 | ||
14 | #define PT_REGS_EAX(r) UPT_EAX(&(r)->regs) | 17 | #define PT_REGS_EAX(r) UPT_EAX(&(r)->regs) |
15 | #define PT_REGS_EBX(r) UPT_EBX(&(r)->regs) | 18 | #define PT_REGS_EBX(r) UPT_EBX(&(r)->regs) |
@@ -38,15 +41,34 @@ | |||
38 | 41 | ||
39 | #define user_mode(r) UPT_IS_USER(&(r)->regs) | 42 | #define user_mode(r) UPT_IS_USER(&(r)->regs) |
40 | 43 | ||
41 | #endif | 44 | extern int ptrace_get_thread_area(struct task_struct *child, int idx, |
45 | struct user_desc __user *user_desc); | ||
42 | 46 | ||
43 | /* | 47 | extern int ptrace_set_thread_area(struct task_struct *child, int idx, |
44 | * Overrides for Emacs so that we follow Linus's tabbing style. | 48 | struct user_desc __user *user_desc); |
45 | * Emacs will notice this stuff at the end of the file and automatically | 49 | |
46 | * adjust the settings for this buffer only. This must remain at the end | 50 | extern int do_set_thread_area_skas(struct user_desc *info); |
47 | * of the file. | 51 | extern int do_get_thread_area_skas(struct user_desc *info); |
48 | * --------------------------------------------------------------------------- | 52 | |
49 | * Local variables: | 53 | extern int do_set_thread_area_tt(struct user_desc *info); |
50 | * c-file-style: "linux" | 54 | extern int do_get_thread_area_tt(struct user_desc *info); |
51 | * End: | 55 | |
52 | */ | 56 | extern int arch_switch_tls_skas(struct task_struct *from, struct task_struct *to); |
57 | extern int arch_switch_tls_tt(struct task_struct *from, struct task_struct *to); | ||
58 | |||
59 | extern void arch_switch_to_tt(struct task_struct *from, struct task_struct *to); | ||
60 | extern void arch_switch_to_skas(struct task_struct *from, struct task_struct *to); | ||
61 | |||
62 | static 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 | |||
67 | static 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 | |||
72 | struct task_struct; | ||
73 | |||
74 | #endif | ||