summaryrefslogtreecommitdiffstats
path: root/include/linux/syscalls.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/syscalls.h')
-rw-r--r--include/linux/syscalls.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index d4dfac878fab..88951b795ee3 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -173,8 +173,20 @@ extern struct trace_event_functions exit_syscall_print_funcs;
static struct syscall_metadata __used \
__attribute__((section("__syscalls_metadata"))) \
*__p_syscall_meta_##sname = &__syscall_meta_##sname;
+
+static inline int is_syscall_trace_event(struct trace_event_call *tp_event)
+{
+ return tp_event->class == &event_class_syscall_enter ||
+ tp_event->class == &event_class_syscall_exit;
+}
+
#else
#define SYSCALL_METADATA(sname, nb, ...)
+
+static inline int is_syscall_trace_event(struct trace_event_call *tp_event)
+{
+ return 0;
+}
#endif
#define SYSCALL_DEFINE0(sname) \