2f9d011d79f23ddfbaf198bd6e84e1fc04aa599f
[lttng-modules.git] / wrapper / kprobes.h
1 /* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
2 *
3 * src/wrapper/kprobes.h
4 *
5 * Copyright (C) 2021 Michael Jeanson <mjeanson@efficios.com>
6 */
7
8 #ifndef _LTTNG_WRAPPER_KPROBES_H
9 #define _LTTNG_WRAPPER_KPROBES_H
10
11 #include <linux/kprobes.h>
12 #include <lttng-kernel-version.h>
13
14 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
15
16 static inline
17 struct kretprobe *lttng_get_kretprobe(struct kretprobe_instance *ri)
18 {
19 return get_kretprobe(ri);
20 }
21
22 #else /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) */
23
24 static inline
25 struct kretprobe *lttng_get_kretprobe(struct kretprobe_instance *ri)
26 {
27 return ri->rp;
28 }
29
30 #endif /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) */
31
32 #endif /* _LTTNG_WRAPPER_KPROBES_H */
This page took 0.031245 seconds and 4 git commands to generate.