aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
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> */