X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=tests%2Futils%2Ftestapp%2Fgen-ust-events-constructor%2Fmain_c-a.c;fp=tests%2Futils%2Ftestapp%2Fgen-ust-events-constructor%2Fmain_c-a.c;h=0a7d1f0b67089f48050d4c9ee2f90eac71ecd011;hb=21b65d7fb06219571f42159b3667454c3104a8b7;hp=0000000000000000000000000000000000000000;hpb=09a872ef0b4e1432329aa42fecc61f50e9baa367;p=lttng-tools.git diff --git a/tests/utils/testapp/gen-ust-events-constructor/main_c-a.c b/tests/utils/testapp/gen-ust-events-constructor/main_c-a.c new file mode 100644 index 000000000..0a7d1f0b6 --- /dev/null +++ b/tests/utils/testapp/gen-ust-events-constructor/main_c-a.c @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2024 Kienan Stewart + * + * SPDX-License-Identifier: LGPL-2.1-only + */ + +#include "tp-a_c.h" +#include "tp.h" + +/* Use tracepoints defined and provided by static archive. */ +void test_constructor_a(void) __attribute__((constructor)); +void test_constructor_a(void) +{ + tracepoint(tp_a_c, constructor_c_provider_static_archive); +} + +void test_destructor_a(void) __attribute__((destructor)); +void test_destructor_a(void) +{ + tracepoint(tp_a_c, destructor_c_provider_static_archive); +} + +int main(void) +{ + tracepoint(tp, main); + return 0; +}