Commit | Line | Data |
---|---|---|
b7cdc182 | 1 | /* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) |
9f36eaed | 2 | * |
3a523f5b MD |
3 | * wrapper/tracepoint.h |
4 | * | |
5 | * wrapper around DECLARE_EVENT_CLASS. | |
6 | * | |
7 | * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
3a523f5b MD |
8 | */ |
9 | ||
9f36eaed MJ |
10 | #ifndef _LTTNG_WRAPPER_TRACEPOINT_H |
11 | #define _LTTNG_WRAPPER_TRACEPOINT_H | |
12 | ||
5f4c791e | 13 | #include <lttng/kernel-version.h> |
a6837bed | 14 | #include <lttng/tracepoint.h> |
3a523f5b | 15 | #include <linux/tracepoint.h> |
dd8d5afb | 16 | #include <linux/module.h> |
3a523f5b | 17 | |
5f4c791e | 18 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0)) |
0116245f MJ |
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 | ||
5f4c791e | 26 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,19,0)) |
c1b0a625 MD |
27 | static inline struct tracepoint *lttng_tracepoint_ptr_deref(tracepoint_ptr_t *p) |
28 | { | |
29 | return tracepoint_ptr_deref(p); | |
30 | } | |
5f4c791e | 31 | #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,19,0)) */ |
61259e63 | 32 | static inline struct tracepoint *lttng_tracepoint_ptr_deref(struct tracepoint * const *p) |
c1b0a625 MD |
33 | { |
34 | return *p; | |
35 | } | |
5f4c791e | 36 | #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,19,0)) */ |
c1b0a625 | 37 | |
3a523f5b | 38 | #endif /* _LTTNG_WRAPPER_TRACEPOINT_H */ |