+ lttng_ust_fixup_ring_buffer_client_discard_tls();
+ lttng_ust_fixup_ring_buffer_client_discard_rt_tls();
+ lttng_ust_fixup_ring_buffer_client_overwrite_tls();
+ lttng_ust_fixup_ring_buffer_client_overwrite_rt_tls();
+}
+
+/*
+ * LTTng-UST uses Global Dynamic model TLS variables rather than IE
+ * model because many versions of glibc don't preallocate a pool large
+ * enough for TLS variables IE model defined in other shared libraries,
+ * and causes issues when using LTTng-UST for Java tracing.
+ *
+ * Because of this use of Global Dynamic TLS variables, users wishing to
+ * trace from signal handlers need to explicitly trigger the lazy
+ * allocation of those variables for each thread before using them.
+ * This can be triggered by calling lttng_ust_init_thread().
+ */
+void lttng_ust_init_thread(void)
+{
+ /*
+ * Because those TLS variables are global dynamic, we need to
+ * ensure those are initialized before a signal handler nesting over
+ * this thread attempts to use them.
+ */
+ lttng_ust_fixup_tls();