aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2008-07-25 22:45:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-26 15:00:08 -0400
commit30199f5a46aee204bf437a4f5b0740f3efe448b7 (patch)
tree9855ecf45727f6c41e9d75d4a5ac68c35546c14d /include/linux
parentff1188646c6870f336e910fb894eeed74f50471f (diff)
tracehook: exit
This moves the PTRACE_EVENT_EXIT tracing into a tracehook.h inline, tracehook_report_exec(). The change has no effect, just clean-up. 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/linux')
-rw-r--r--include/linux/tracehook.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
index 6276353709c1..967ab473afbc 100644
--- a/include/linux/tracehook.h
+++ b/include/linux/tracehook.h
@@ -95,4 +95,19 @@ static inline void tracehook_report_exec(struct linux_binfmt *fmt,
95 send_sig(SIGTRAP, current, 0); 95 send_sig(SIGTRAP, current, 0);
96} 96}
97 97
98/**
99 * tracehook_report_exit - task has begun to exit
100 * @exit_code: pointer to value destined for @current->exit_code
101 *
102 * @exit_code points to the value passed to do_exit(), which tracing
103 * might change here. This is almost the first thing in do_exit(),
104 * before freeing any resources or setting the %PF_EXITING flag.
105 *
106 * Called with no locks held.
107 */
108static inline void tracehook_report_exit(long *exit_code)
109{
110 ptrace_event(PT_TRACE_EXIT, PTRACE_EVENT_EXIT, *exit_code);
111}
112
98#endif /* <linux/tracehook.h> */ 113#endif /* <linux/tracehook.h> */