Commit | Line | Data |
---|---|---|
a4cc1b1f MD |
1 | /* |
2 | * Copyright (C) 2023 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
3 | * | |
4 | * SPDX-License-Identifier: LGPL-2.1-only | |
5 | */ | |
6 | ||
7 | #include "obj.h" | |
8 | ||
9 | static void fct_constructor4(void); | |
10 | static void fct_destructor4(void); | |
11 | ||
12 | void test_constructor4_same_unit_before(void) __attribute__((constructor)); | |
13 | void test_constructor4_same_unit_before(void) | |
14 | { | |
15 | fct_constructor4(); | |
16 | } | |
17 | ||
18 | void test_destructor4_same_unit_before(void) __attribute__((destructor)); | |
19 | void test_destructor4_same_unit_before(void) | |
20 | { | |
21 | fct_destructor4(); | |
22 | } | |
23 | ||
24 | Obj g_obj_same_unit_before_provider("global - same unit before provider"); | |
25 | ||
26 | #define TRACEPOINT_CREATE_PROBES | |
27 | #include "tp.h" | |
28 | ||
29 | Obj g_obj_same_unit_after_provider("global - same unit after provider"); | |
30 | ||
31 | static void fct_constructor4(void) | |
32 | { | |
33 | tracepoint(tp, constructor_c_same_unit_before_provider); | |
34 | } | |
35 | ||
36 | static void fct_destructor4(void) | |
37 | { | |
38 | tracepoint(tp, destructor_c_same_unit_before_provider); | |
39 | } | |
40 | ||
41 | void test_constructor4_same_unit_after(void) __attribute__((constructor)); | |
42 | void test_constructor4_same_unit_after(void) | |
43 | { | |
44 | tracepoint(tp, constructor_c_same_unit_after_provider); | |
45 | } | |
46 | ||
47 | void test_destructor4_same_unit_after(void) __attribute__((destructor)); | |
48 | void test_destructor4_same_unit_after(void) | |
49 | { | |
50 | tracepoint(tp, destructor_c_same_unit_after_provider); | |
51 | } |