Tests: Introduce gen-ust-events-constructor test application
[lttng-tools.git] / tests / utils / testapp / gen-ust-events-constructor / 03-tp-after-define.cpp
diff --git a/tests/utils/testapp/gen-ust-events-constructor/03-tp-after-define.cpp b/tests/utils/testapp/gen-ust-events-constructor/03-tp-after-define.cpp
new file mode 100644 (file)
index 0000000..fba3c26
--- /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_constructor3(void) __attribute__((constructor));
+void test_constructor3(void)
+{
+       tracepoint(tp, constructor_c_across_units_after_define);
+}
+
+void test_destructor3(void) __attribute__((destructor));
+void test_destructor3(void)
+{
+       tracepoint(tp, destructor_c_across_units_after_define);
+}
+
+Obj g_obj_across_units_after_define("global - across units after define");
This page took 0.024715 seconds and 4 git commands to generate.