Split syscall tracepoint generation in their own files
[lttng-modules.git] / src / lttng-syscalls.h
1 /* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
2 *
3 * lttng-syscalls.h
4 *
5 * LTTng syscall header.
6 *
7 * Copyright (C) 2021 Francis Deslauriers <francis.deslauriers@efficios.com>
8 */
9
10 #ifndef LTTNG_SYSCALLS_H
11 #define LTTNG_SYSCALLS_H
12
13 #include <stddef.h>
14
15 #include <asm/ptrace.h>
16
17 #include <lttng/events.h>
18 #include <lttng/kernel-version.h>
19
20
21 /*
22 * Forward declarations for old kernels.
23 */
24 struct mmsghdr;
25 struct rlimit64;
26 struct oldold_utsname;
27 struct old_utsname;
28 struct sel_arg_struct;
29 struct mmap_arg_struct;
30 struct file_handle;
31 struct user_msghdr;
32
33 /*
34 * Forward declaration for kernels >= 5.6
35 */
36 struct timex;
37 struct timeval;
38 struct itimerval;
39 struct itimerspec;
40
41 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
42 typedef __kernel_old_time_t time_t;
43 #endif
44
45 struct trace_syscall_entry {
46 void *event_func;
47 const struct lttng_kernel_event_desc *desc;
48 const struct lttng_kernel_event_field **fields;
49 unsigned int nrargs;
50 };
51
52 struct trace_syscall_table {
53 const struct trace_syscall_entry *table;
54 const size_t len;
55 };
56
57 extern
58 void syscall_entry_event_probe(void *__data, struct pt_regs *regs, long id);
59
60 extern
61 void syscall_exit_event_probe(void *__data, struct pt_regs *regs, long ret);
62
63 extern
64 void syscall_entry_event_notifier_probe(void *__data, struct pt_regs *regs,
65 long id);
66 extern
67 void syscall_exit_event_notifier_probe(void *__data, struct pt_regs *regs,
68 long ret);
69
70 #endif /* LTTNG_SYSCALLS_H */
This page took 0.035839 seconds and 4 git commands to generate.