diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-08-29 16:12:36 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-29 16:12:36 -0400 |
commit | 2fca877b68b2b4fc5b94277858a1bedd46017cde (patch) | |
tree | fd02725406299ba2f26354463b3c261721e9eb6b /include/asm-i386/ptrace.h | |
parent | ff40c6d3d1437ecdf295b8e39adcb06c3d6021ef (diff) | |
parent | 02b3e4e2d71b6058ec11cc01c72ac651eb3ded2b (diff) |
/spare/repo/libata-dev branch 'v2.6.13'
Diffstat (limited to 'include/asm-i386/ptrace.h')
-rw-r--r-- | include/asm-i386/ptrace.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/include/asm-i386/ptrace.h b/include/asm-i386/ptrace.h index 8618914b3521..05532875e39e 100644 --- a/include/asm-i386/ptrace.h +++ b/include/asm-i386/ptrace.h | |||
@@ -55,15 +55,26 @@ struct pt_regs { | |||
55 | #define PTRACE_SET_THREAD_AREA 26 | 55 | #define PTRACE_SET_THREAD_AREA 26 |
56 | 56 | ||
57 | #ifdef __KERNEL__ | 57 | #ifdef __KERNEL__ |
58 | |||
59 | #include <asm/vm86.h> | ||
60 | |||
58 | struct task_struct; | 61 | struct task_struct; |
59 | extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code); | 62 | extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code); |
60 | #define user_mode(regs) ((VM_MASK & (regs)->eflags) || (3 & (regs)->xcs)) | 63 | |
64 | static inline int user_mode(struct pt_regs *regs) | ||
65 | { | ||
66 | return (regs->xcs & 3) != 0; | ||
67 | } | ||
68 | static inline int user_mode_vm(struct pt_regs *regs) | ||
69 | { | ||
70 | return ((regs->xcs & 3) | (regs->eflags & VM_MASK)) != 0; | ||
71 | } | ||
61 | #define instruction_pointer(regs) ((regs)->eip) | 72 | #define instruction_pointer(regs) ((regs)->eip) |
62 | #if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER) | 73 | #if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER) |
63 | extern unsigned long profile_pc(struct pt_regs *regs); | 74 | extern unsigned long profile_pc(struct pt_regs *regs); |
64 | #else | 75 | #else |
65 | #define profile_pc(regs) instruction_pointer(regs) | 76 | #define profile_pc(regs) instruction_pointer(regs) |
66 | #endif | 77 | #endif |
67 | #endif | 78 | #endif /* __KERNEL__ */ |
68 | 79 | ||
69 | #endif | 80 | #endif |