Fix: fixup vtid TLS
[lttng-ust.git] / liblttng-ust / lttng-ust-comm.c
index 36f57efb25f4d97c31bcb04b7fd207f2807b9a8c..1815801a8fe08a06df22b6d1614efc969ca75b4d 100644 (file)
@@ -46,6 +46,7 @@
 #include "tracepoint-internal.h"
 #include "ltt-tracer-core.h"
 #include "compat.h"
+#include "../libringbuffer/tlsfixup.h"
 
 /*
  * Has lttng ust comm constructor been called ?
@@ -827,6 +828,15 @@ void __attribute__((constructor)) lttng_ust_init(void)
        if (uatomic_xchg(&initialized, 1) == 1)
                return;
 
+       /*
+        * Fixup interdependency between TLS fixup mutex (which happens
+        * to be the dynamic linker mutex) and ust_lock, taken within
+        * the ust lock.
+        */
+       lttng_fixup_event_tls();
+       lttng_fixup_ringbuffer_tls();
+       lttng_fixup_vtid_tls();
+
        /*
         * We want precise control over the order in which we construct
         * our sub-libraries vs starting to receive commands from
This page took 0.024428 seconds and 4 git commands to generate.