Fix: add missing #include for 3.8 kernel
[lttng-modules.git] / src / lttng-syscalls.h
CommitLineData
e42c4f49
FD
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
ebcc64cd
FD
10#ifndef LTTNG_SYSCALLS_H
11#define LTTNG_SYSCALLS_H
12
13#include <stddef.h>
14
e42c4f49 15#include <asm/ptrace.h>
87ad3fdc
FD
16#include <linux/compat.h>
17#include <linux/fcntl.h>
18#include <linux/in.h>
19#include <linux/in6.h>
20#include <linux/mman.h>
e42c4f49 21
ebcc64cd 22#include <lttng/events.h>
e42c4f49
FD
23#include <lttng/kernel-version.h>
24
25
26/*
27 * Forward declarations for old kernels.
28 */
29struct mmsghdr;
30struct rlimit64;
31struct oldold_utsname;
32struct old_utsname;
33struct sel_arg_struct;
34struct mmap_arg_struct;
35struct file_handle;
36struct user_msghdr;
37
38/*
39 * Forward declaration for kernels >= 5.6
40 */
41struct timex;
42struct timeval;
43struct itimerval;
44struct itimerspec;
45
46#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
47typedef __kernel_old_time_t time_t;
48#endif
49
ebcc64cd
FD
50struct trace_syscall_entry {
51 void *event_func;
52 const struct lttng_kernel_event_desc *desc;
4f1d1ee5 53 const struct lttng_kernel_event_field * const *fields;
ebcc64cd
FD
54 unsigned int nrargs;
55};
56
57struct trace_syscall_table {
58 const struct trace_syscall_entry *table;
59 const size_t len;
60};
e42c4f49
FD
61
62extern
63void syscall_entry_event_probe(void *__data, struct pt_regs *regs, long id);
64
65extern
66void syscall_exit_event_probe(void *__data, struct pt_regs *regs, long ret);
67
68extern
69void syscall_entry_event_notifier_probe(void *__data, struct pt_regs *regs,
70 long id);
71extern
72void syscall_exit_event_notifier_probe(void *__data, struct pt_regs *regs,
73 long ret);
74
ebcc64cd 75#endif /* LTTNG_SYSCALLS_H */
This page took 0.02523 seconds and 4 git commands to generate.