Drop support for kernels < 4.4 from 'wrapper/tracepoint.h'
[lttng-modules.git] / include / wrapper / tracepoint.h
1 /* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
2 *
3 * wrapper/tracepoint.h
4 *
5 * wrapper around DECLARE_EVENT_CLASS.
6 *
7 * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 */
9
10 #ifndef _LTTNG_WRAPPER_TRACEPOINT_H
11 #define _LTTNG_WRAPPER_TRACEPOINT_H
12
13 #include <lttng/kernel-version.h>
14 #include <lttng/tracepoint.h>
15 #include <linux/tracepoint.h>
16 #include <linux/module.h>
17
18 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
19 #define LTTNG_DEFINE_TRACE(name, proto, args) \
20 DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
21 #else
22 #define LTTNG_DEFINE_TRACE(name, proto, args) \
23 DEFINE_TRACE(name)
24 #endif
25
26 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,19,0))
27 static inline struct tracepoint *lttng_tracepoint_ptr_deref(tracepoint_ptr_t *p)
28 {
29 return tracepoint_ptr_deref(p);
30 }
31 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,19,0)) */
32 static inline struct tracepoint *lttng_tracepoint_ptr_deref(struct tracepoint * const *p)
33 {
34 return *p;
35 }
36 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,19,0)) */
37
38 #endif /* _LTTNG_WRAPPER_TRACEPOINT_H */
This page took 0.029053 seconds and 4 git commands to generate.