|
@@ -4,6 +4,7 @@
|
|
|
#include <linux/tracepoint.h>
|
|
|
#include <linux/unistd.h>
|
|
|
#include <linux/ftrace_event.h>
|
|
|
+#include <linux/thread_info.h>
|
|
|
|
|
|
#include <asm/ptrace.h>
|
|
|
|
|
@@ -32,4 +33,18 @@ struct syscall_metadata {
|
|
|
struct ftrace_event_call *exit_event;
|
|
|
};
|
|
|
|
|
|
+#if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_HAVE_SYSCALL_TRACEPOINTS)
|
|
|
+static inline void syscall_tracepoint_update(struct task_struct *p)
|
|
|
+{
|
|
|
+ if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
|
|
|
+ set_tsk_thread_flag(p, TIF_SYSCALL_TRACEPOINT);
|
|
|
+ else
|
|
|
+ clear_tsk_thread_flag(p, TIF_SYSCALL_TRACEPOINT);
|
|
|
+}
|
|
|
+#else
|
|
|
+static inline void syscall_tracepoint_update(struct task_struct *p)
|
|
|
+{
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
#endif /* _TRACE_SYSCALL_H */
|