aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2008-07-25 22:45:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-26 15:00:10 -0400
commitbbc698636ed48b6fcd323964e0f847a6a796325d (patch)
treec90d31c179aad154089a88d4845f1721ded40860 /include
parent85ba2d862e521375a8ee01526c5c46b1f24bb4af (diff)
task_current_syscall
This adds the new function task_current_syscall() on machines where the asm/syscall.h interface is supported (CONFIG_HAVE_ARCH_TRACEHOOK). It's exported for modules to use in the future. This function safely samples the state of a blocked thread to collect what system call it is blocked in, and the six system call argument registers. Signed-off-by: Roland McGrath <roland@redhat.com> Cc: Oleg Nesterov <oleg@tv-sign.ru> Reviewed-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-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 ed69c03692d9..fd31756e1a00 100644
--- a/include/linux/ptrace.h
+++ b/include/linux/ptrace.h
@@ -314,6 +314,10 @@ static inline void user_enable_block_step(struct task_struct *task)
314#define arch_ptrace_stop(code, info) do { } while (0) 314#define arch_ptrace_stop(code, info) do { } while (0)
315#endif 315#endif
316 316
317extern int task_current_syscall(struct task_struct *target, long *callno,
318 unsigned long args[6], unsigned int maxargs,
319 unsigned long *sp, unsigned long *pc);
320
317#endif 321#endif
318 322
319#endif 323#endif