Expose a common alloc_tls for liblttng-ust-common
[lttng-ust.git] / src / lib / lttng-ust-common / ust-common.c
1 /*
2 * SPDX-License-Identifier: LGPL-2.1-only
3 *
4 * Copyright (C) 2021 Michael Jeanson <mjeanson@efficios.com>
5 */
6
7 #include <lttng/ust-common.h>
8
9 #include "common/logging.h"
10 #include "common/ust-fd.h"
11 #include "common/getenv.h"
12
13 #include "lib/lttng-ust-common/fd-tracker.h"
14
15 /*
16 * The liblttng-ust-common constructor, initialize the internal shared state.
17 * Libraries linking on liblttng-ust-common should also call this early in
18 * their constructor since there is no reliable way to guarantee the execution
19 * order of constructors across shared library.
20 */
21 void lttng_ust_common_ctor(void)
22 {
23 /*
24 * Initialize the shared state of the fd tracker.
25 */
26 lttng_ust_fd_tracker_init();
27 }
28
29 void lttng_ust_common_alloc_tls(void)
30 {
31 lttng_ust_fd_tracker_alloc_tls();
32 }
This page took 0.029335 seconds and 4 git commands to generate.