X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Flttng-syscalls.h;h=d221dfb7c7d2a4424d3086c548a4a928dc297bb8;hb=e42c4f49c15b;hp=9a9d9173312fd9143872b6a882a62b82b5efff86;hpb=b4781a696ebd02c28e1f6d10f347cea82fb72cbb;p=lttng-modules.git diff --git a/src/lttng-syscalls.h b/src/lttng-syscalls.h index 9a9d9173..d221dfb7 100644 --- a/src/lttng-syscalls.h +++ b/src/lttng-syscalls.h @@ -1,9 +1,47 @@ +/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) + * + * lttng-syscalls.h + * + * LTTng syscall header. + * + * Copyright (C) 2021 Francis Deslauriers + */ + #ifndef LTTNG_SYSCALLS_H #define LTTNG_SYSCALLS_H #include +#include + #include +#include + + +/* + * Forward declarations for old kernels. + */ +struct mmsghdr; +struct rlimit64; +struct oldold_utsname; +struct old_utsname; +struct sel_arg_struct; +struct mmap_arg_struct; +struct file_handle; +struct user_msghdr; + +/* + * Forward declaration for kernels >= 5.6 + */ +struct timex; +struct timeval; +struct itimerval; +struct itimerspec; + +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0)) +typedef __kernel_old_time_t time_t; +#endif + struct trace_syscall_entry { void *event_func; const struct lttng_kernel_event_desc *desc; @@ -15,4 +53,18 @@ struct trace_syscall_table { const struct trace_syscall_entry *table; const size_t len; }; + +extern +void syscall_entry_event_probe(void *__data, struct pt_regs *regs, long id); + +extern +void syscall_exit_event_probe(void *__data, struct pt_regs *regs, long ret); + +extern +void syscall_entry_event_notifier_probe(void *__data, struct pt_regs *regs, + long id); +extern +void syscall_exit_event_notifier_probe(void *__data, struct pt_regs *regs, + long ret); + #endif /* LTTNG_SYSCALLS_H */