Expose a common alloc_tls for liblttng-ust-common
authorMichael Jeanson <mjeanson@efficios.com>
Fri, 23 Apr 2021 18:06:31 +0000 (14:06 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 23 Apr 2021 19:42:39 +0000 (15:42 -0400)
Expose a common function to force the allocation of all TLS variables
owned by liblttng-ust-common, hide the fd-tracker behind it.

Change-Id: I6acfe7f85bce1e8939cd8e1d64ecb979525fa547
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/ust-common.h
src/common/ust-fd.h
src/lib/lttng-ust-common/fd-tracker.h
src/lib/lttng-ust-common/ust-common.c
src/lib/lttng-ust/lttng-ust-comm.c

index 8396e6b44151b836c136920edd159d1c3a7b560e..a59a02359e7a89bd36375d044967eab594b05918 100644 (file)
@@ -17,4 +17,6 @@
 void lttng_ust_common_ctor(void)
        __attribute__((constructor));
 
+void lttng_ust_common_alloc_tls(void);
+
 #endif
index b6a078bf836b52b52ddf1dfb13c9a4f81fcb7778..4e6c4a5d2bd6e729bf1209d49f29a05a79ba99f5 100644 (file)
@@ -26,6 +26,4 @@ int lttng_ust_safe_close_fd(int fd, int (*close_cb)(int));
 int lttng_ust_safe_fclose_stream(FILE *stream, int (*fclose_cb)(FILE *stream));
 int lttng_ust_safe_closefrom_fd(int lowfd, int (*close_cb)(int));
 
-void lttng_ust_fd_tracker_alloc_tls(void);
-
 #endif /* _LTTNG_UST_FD_H */
index 07c13724d08741ba2f77dfe18cb38a4b1814352f..2432eaa47bdbe353afc38084872c72bab1208fc5 100644 (file)
@@ -10,4 +10,7 @@
 void lttng_ust_fd_tracker_init(void)
        __attribute__((visibility("hidden")));
 
+void lttng_ust_fd_tracker_alloc_tls(void)
+       __attribute__((visibility("hidden")));
+
 #endif
index e163383d2b458bca3b9386f91b680cb0da825ea9..f444c97f1a7cb7916b5237de791dcf606a774423 100644 (file)
@@ -25,3 +25,8 @@ void lttng_ust_common_ctor(void)
         */
        lttng_ust_fd_tracker_init();
 }
+
+void lttng_ust_common_alloc_tls(void)
+{
+       lttng_ust_fd_tracker_alloc_tls();
+}
index b76564723ddca64ca404e256013abc84fe5404ac..6cdce82dbd22550bba602eae6f3ef000fef59219 100644 (file)
@@ -406,7 +406,7 @@ void lttng_ust_alloc_tls(void)
        lttng_procname_alloc_tls();
        lttng_ust_mutex_nest_alloc_tls();
        lttng_ust_perf_counter_alloc_tls();
-       lttng_ust_fd_tracker_alloc_tls();
+       lttng_ust_common_alloc_tls();
        lttng_cgroup_ns_alloc_tls();
        lttng_ipc_ns_alloc_tls();
        lttng_net_ns_alloc_tls();
This page took 0.026932 seconds and 4 git commands to generate.