Fix: fixup vtid TLS
[lttng-ust.git] / liblttng-ust / lttng-context-vtid.c
index 6f7e078d22d2910072748adfd0ee59b8c9a695b4..22261f55e02173a6ffdf29370dfb879453c64f23 100644 (file)
@@ -12,6 +12,7 @@
 #include <lttng/ust-events.h>
 #include <lttng/ust-tracer.h>
 #include <lttng/ringbuffer-config.h>
+#include "ltt-tracer-core.h"
 
 #ifdef __linux__
 #include <syscall.h>
@@ -92,3 +93,11 @@ int lttng_add_vtid_to_ctx(struct lttng_ctx **ctx)
        field->record = vtid_record;
        return 0;
 }
+
+/*
+ * Force a read (imply TLS fixup for dlopen) of TLS variables.
+ */
+void lttng_fixup_vtid_tls(void)
+{
+       asm volatile ("" : : "m" (cached_vtid));
+}
This page took 0.023087 seconds and 4 git commands to generate.