#include <lttng-tracepoint.h>
#include <wrapper/list.h>
+#include <wrapper/tracepoint.h>
/*
* Protect the tracepoint table. lttng_tracepoint_mutex nests within
struct tracepoint_entry *e;
struct lttng_tp_probe *p;
- tp = tp_mod->mod->tracepoints_ptrs[i];
+ tp = lttng_tracepoint_ptr_deref(&tp_mod->mod->tracepoints_ptrs[i]);
e = get_tracepoint(tp->name);
if (!e) {
e = add_tracepoint(tp->name);
struct tracepoint_entry *e;
struct lttng_tp_probe *p;
- tp = tp_mod->mod->tracepoints_ptrs[i];
+ tp = lttng_tracepoint_ptr_deref(&tp_mod->mod->tracepoints_ptrs[i]);
e = get_tracepoint(tp->name);
if (!e || !e->tp)
continue;
#endif /*#else #if defined(CONFIG_MODULE_SIG) && defined(MODULE) */
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0))
+static inline struct tracepoint *lttng_tracepoint_ptr_deref(tracepoint_ptr_t *p)
+{
+ return tracepoint_ptr_deref(p);
+}
+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0)) */
+static inline struct tracepoint *lttng_tracepoint_ptr_deref(struct tracepoint **p)
+{
+ return *p;
+}
+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0)) */
+
#endif /* _LTTNG_WRAPPER_TRACEPOINT_H */