summaryrefslogtreecommitdiffstats
path: root/include/linux/ptrace.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-09-30 13:12:36 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-09-30 13:36:39 -0400
commita3460a59747cfddfa7be4758e5ef08bf5d751d59 (patch)
tree73395c8755c27c82b867a210bacba7e585c0839c /include/linux/ptrace.h
parent2aa3a7f8660355c3dddead17e224545c1a3d5a5f (diff)
downloadop-kernel-dev-a3460a59747cfddfa7be4758e5ef08bf5d751d59.zip
op-kernel-dev-a3460a59747cfddfa7be4758e5ef08bf5d751d59.tar.gz
new helper: current_pt_regs()
Normally (and that's the default) it's just task_pt_regs(current). However, if an architecture can optimize that, it can do so by making a macro of its own available from asm/ptrace.h. More importantly, some architectures have task_pt_regs() working only for traced tasks blocked on signal delivery. current_pt_regs() needs to work for *all* processes, so before those architectures start using stuff relying on current_pt_regs() they'll need a properly working variant. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/ptrace.h')
-rw-r--r--include/linux/ptrace.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
index 597e4fd..07fd922 100644
--- a/include/linux/ptrace.h
+++ b/include/linux/ptrace.h
@@ -403,6 +403,10 @@ static inline void user_single_step_siginfo(struct task_struct *tsk,
#define arch_ptrace_stop(code, info) do { } while (0)
#endif
+#ifndef current_pt_regs
+#define current_pt_regs() task_pt_regs(current)
+#endif
+
extern int task_current_syscall(struct task_struct *target, long *callno,
unsigned long args[6], unsigned int maxargs,
unsigned long *sp, unsigned long *pc);
OpenPOWER on IntegriCloud