diff options
author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-07-27 09:14:13 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-07-27 09:14:13 -0400 |
commit | c5fbc3966f48279dbebfde10248c977014aa9988 (patch) | |
tree | 0a52f645d89f91952c26b215f460a4ba195ca42c /include/asm-i386/ptrace.h | |
parent | 39299d9d15c41cbdd7c7009967cd35afaf34d8fa (diff) | |
parent | 9e566d8bd61f939b7f5d7d969f5b178571471cf9 (diff) |
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'include/asm-i386/ptrace.h')
-rw-r--r-- | include/asm-i386/ptrace.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/asm-i386/ptrace.h b/include/asm-i386/ptrace.h index eef9f93870d4..b926cb4f4cfd 100644 --- a/include/asm-i386/ptrace.h +++ b/include/asm-i386/ptrace.h | |||
@@ -57,14 +57,21 @@ struct pt_regs { | |||
57 | #ifdef __KERNEL__ | 57 | #ifdef __KERNEL__ |
58 | struct task_struct; | 58 | struct task_struct; |
59 | extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code); | 59 | extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code); |
60 | #define user_mode(regs) (3 & (regs)->xcs) | 60 | |
61 | #define user_mode_vm(regs) ((VM_MASK & (regs)->eflags) || user_mode(regs)) | 61 | static inline int user_mode(struct pt_regs *regs) |
62 | { | ||
63 | return (regs->xcs & 3) != 0; | ||
64 | } | ||
65 | static inline int user_mode_vm(struct pt_regs *regs) | ||
66 | { | ||
67 | return ((regs->xcs & 3) | (regs->eflags & VM_MASK)) != 0; | ||
68 | } | ||
62 | #define instruction_pointer(regs) ((regs)->eip) | 69 | #define instruction_pointer(regs) ((regs)->eip) |
63 | #if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER) | 70 | #if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER) |
64 | extern unsigned long profile_pc(struct pt_regs *regs); | 71 | extern unsigned long profile_pc(struct pt_regs *regs); |
65 | #else | 72 | #else |
66 | #define profile_pc(regs) instruction_pointer(regs) | 73 | #define profile_pc(regs) instruction_pointer(regs) |
67 | #endif | 74 | #endif |
68 | #endif | 75 | #endif /* __KERNEL__ */ |
69 | 76 | ||
70 | #endif | 77 | #endif |