| 1 | /* |
| 2 | * Copyright (C) 2024 Kienan Stewart <kstewart@efficios.com> |
| 3 | * |
| 4 | * SPDX-License-Identifier: LGPL-2.1-only |
| 5 | */ |
| 6 | |
| 7 | static void fct_constructor2(void); |
| 8 | static void fct_destructor2(void); |
| 9 | |
| 10 | void test_constructor2_same_unit_before(void) __attribute__((constructor)); |
| 11 | void test_constructor2_same_unit_before(void) |
| 12 | { |
| 13 | fct_constructor2(); |
| 14 | } |
| 15 | |
| 16 | void test_destructor2_same_unit_before(void) __attribute__((destructor)); |
| 17 | void test_destructor2_same_unit_before(void) |
| 18 | { |
| 19 | fct_destructor2(); |
| 20 | } |
| 21 | |
| 22 | #define TRACEPOINT_DEFINE |
| 23 | #include "tp.h" |
| 24 | |
| 25 | static void fct_constructor2(void) |
| 26 | { |
| 27 | tracepoint(tp, constructor_c_same_unit_before_define); |
| 28 | } |
| 29 | |
| 30 | static void fct_destructor2(void) |
| 31 | { |
| 32 | tracepoint(tp, destructor_c_same_unit_before_define); |
| 33 | } |
| 34 | |
| 35 | void test_constructor2_same_unit_after(void) __attribute__((constructor)); |
| 36 | void test_constructor2_same_unit_after(void) |
| 37 | { |
| 38 | tracepoint(tp, constructor_c_same_unit_after_define); |
| 39 | } |
| 40 | |
| 41 | void test_destructor2_same_unit_after(void) __attribute__((destructor)); |
| 42 | void test_destructor2_same_unit_after(void) |
| 43 | { |
| 44 | tracepoint(tp, destructor_c_same_unit_after_define); |
| 45 | } |