X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=libringbuffer%2Fring_buffer_frontend.c;h=0ae3d72f23a5b16b987d5b142fcb6964bd6f0c61;hb=d51652f7ee9f3214b62c17441913168115ab4c9e;hp=28e959bae215641bd6e149e580802e5242aab61d;hpb=60c089cf52bf7ffdddbbbdd32278aeeb83bd5c97;p=lttng-ust.git diff --git a/libringbuffer/ring_buffer_frontend.c b/libringbuffer/ring_buffer_frontend.c index 28e959ba..0ae3d72f 100644 --- a/libringbuffer/ring_buffer_frontend.c +++ b/libringbuffer/ring_buffer_frontend.c @@ -53,6 +53,7 @@ #include "backend.h" #include "frontend.h" #include "shm.h" +#include "tlsfixup.h" #include "../liblttng-ust/compat.h" /* For ENODATA */ #ifndef max @@ -1508,3 +1509,11 @@ int lib_ring_buffer_reserve_slow(struct lttng_ust_lib_ring_buffer_ctx *ctx) ctx->buf_offset = offsets.begin + offsets.pre_header_padding; return 0; } + +/* + * Force a read (imply TLS fixup for dlopen) of TLS variables. + */ +void lttng_fixup_ringbuffer_tls(void) +{ + asm volatile ("" : : "m" (lib_ring_buffer_nesting)); +}