b546d615dce45a56142fa71b502c1ecd5fb5e619
[lttng-modules.git] / include / 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.029918 seconds and 3 git commands to generate.