tests: test_ust_constructor: Use a C-compiled shared object
[lttng-tools.git] / tests / utils / testapp / gen-ust-events-constructor / tp-so_c.h
diff --git a/tests/utils/testapp/gen-ust-events-constructor/tp-so_c.h b/tests/utils/testapp/gen-ust-events-constructor/tp-so_c.h
new file mode 100644 (file)
index 0000000..58d77cd
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2024 Kienan Stewart <kstewart@efficios.com>
+ *
+ * SPDX-License-Identifier: LGPL-2.1-only
+ */
+
+#ifdef _cplusplus
+extern "C" {
+#endif
+
+#undef TRACEPOINT_PROVIDER
+#define TRACEPOINT_PROVIDER tp_so_c
+
+#if !defined(_TRACEPOINT_TP_SO_C_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
+#define _TRACEPOINT_TP_SO_C_H
+
+#include <lttng/tracepoint.h>
+
+TRACEPOINT_EVENT(tp_so_c, constructor_c_provider_shared_library, TP_ARGS(), TP_FIELDS())
+
+TRACEPOINT_EVENT(tp_so_c, destructor_c_provider_shared_library, TP_ARGS(), TP_FIELDS())
+
+#endif /* _TRACEPOINT_TP_SO_C_H */
+
+#undef TRACEPOINT_INCLUDE
+#define TRACEPOINT_INCLUDE "./tp-so_c.h"
+
+/* This part must be outside ifdef protection */
+#include <lttng/tracepoint-event.h>
+
+#ifdef _cplusplus
+}
+#endif
This page took 0.023061 seconds and 4 git commands to generate.