X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=tests%2Futils%2Ftestapp%2Fgen-ust-events-constructor%2Fmain_c-so.c;fp=tests%2Futils%2Ftestapp%2Fgen-ust-events-constructor%2Fmain_c-so.c;h=70ee49b19b85418e286440bbd72f83acf9f36275;hb=21b65d7fb06219571f42159b3667454c3104a8b7;hp=0000000000000000000000000000000000000000;hpb=09a872ef0b4e1432329aa42fecc61f50e9baa367;p=lttng-tools.git diff --git a/tests/utils/testapp/gen-ust-events-constructor/main_c-so.c b/tests/utils/testapp/gen-ust-events-constructor/main_c-so.c new file mode 100644 index 000000000..70ee49b19 --- /dev/null +++ b/tests/utils/testapp/gen-ust-events-constructor/main_c-so.c @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2024 Kienan Stewart + * + * SPDX-LIcense-Identifier: LGPL-2.1-only + */ + +#include "tp-so_c.h" +#include "tp.h" + +/* Use tracepoints defined and provided by shared libraries. */ +void test_constructor_so(void) __attribute__((constructor)); +void test_constructor_so(void) +{ + tracepoint(tp_so_c, constructor_c_provider_shared_library); +} + +void test_destructor_so(void) __attribute__((destructor)); +void test_destructor_so(void) +{ + tracepoint(tp_so_c, destructor_c_provider_shared_library); +} + +int main(void) +{ + tracepoint(tp, main); + return 0; +}