projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: fixup ringbuffer tls at constructor by forcing read
[lttng-ust.git]
/
libringbuffer
/
ring_buffer_frontend.c
diff --git
a/libringbuffer/ring_buffer_frontend.c
b/libringbuffer/ring_buffer_frontend.c
index 28e959bae215641bd6e149e580802e5242aab61d..0ae3d72f23a5b16b987d5b142fcb6964bd6f0c61 100644
(file)
--- 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 "backend.h"
#include "frontend.h"
#include "shm.h"
+#include "tlsfixup.h"
#include "../liblttng-ust/compat.h" /* For ENODATA */
#ifndef max
#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;
}
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));
+}
This page took
0.041528 seconds
and
5
git commands to generate.