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 0996ecefc0313ff5ef8b955ce7dffd3a6a793849..970fde90a2a79bd0d8638f2eefc168b07c7e8499 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"
#ifndef max
#define max(a, b) ((a) > (b) ? (a) : (b))
#ifndef max
#define max(a, b) ((a) > (b) ? (a) : (b))
@@
-1507,3
+1508,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.023124 seconds
and
4
git commands to generate.