Tests: Introduce gen-ust-events-constructor test application
[lttng-tools.git] / tests / utils / testapp / gen-ust-events-constructor / 01-tp-before-define.cpp
diff --git a/tests/utils/testapp/gen-ust-events-constructor/01-tp-before-define.cpp b/tests/utils/testapp/gen-ust-events-constructor/01-tp-before-define.cpp
new file mode 100644 (file)
index 0000000..5219924
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2023 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * SPDX-License-Identifier: LGPL-2.1-only
+ */
+
+#include "obj.h"
+#include "tp.h"
+
+void test_constructor1(void) __attribute__((constructor));
+void test_constructor1(void)
+{
+       tracepoint(tp, constructor_c_across_units_before_define);
+}
+
+void test_destructor1(void) __attribute__((destructor));
+void test_destructor1(void)
+{
+       tracepoint(tp, destructor_c_across_units_before_define);
+}
+
+Obj g_obj_across_units_before_define("global - across units before define");
This page took 0.023297 seconds and 4 git commands to generate.