X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-context-vtid.c;h=c419d18b3ede7db666d2c5ea3cada82df6dafcbd;hb=daeb93bb244bf406d9e8bd620247b64f9144127a;hp=3fe86405c112307a47e6c1abe0a9c62fe8b2175b;hpb=d51652f7ee9f3214b62c17441913168115ab4c9e;p=lttng-ust.git diff --git a/liblttng-ust/lttng-context-vtid.c b/liblttng-ust/lttng-context-vtid.c index 3fe86405..c419d18b 100644 --- a/liblttng-ust/lttng-context-vtid.c +++ b/liblttng-ust/lttng-context-vtid.c @@ -13,6 +13,7 @@ #include #include #include +#include "ltt-tracer-core.h" /* * We cache the result to ensure we don't trigger a system call for @@ -74,3 +75,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)); +}