X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=src%2Flib%2Flttng-ust%2Flttng-context-ipc-ns.c;h=078e646106b576bc8deee1778b0e291c6389f6e4;hb=c246521ddcba1d1d28cfa0482aa500b9122e7264;hp=96267ef9d27b3c16fcae43a32c4992880c08df73;hpb=b2e37d27accf5e32128b82392dbe1a9522c7dc20;p=lttng-ust.git diff --git a/src/lib/lttng-ust/lttng-context-ipc-ns.c b/src/lib/lttng-ust/lttng-context-ipc-ns.c index 96267ef9..078e6461 100644 --- a/src/lib/lttng-ust/lttng-context-ipc-ns.c +++ b/src/lib/lttng-ust/lttng-context-ipc-ns.c @@ -121,7 +121,7 @@ void ipc_ns_get_value(void *priv __attribute__((unused)), value->u.u64 = get_ipc_ns(); } -const struct lttng_ust_ctx_field *ctx_field = lttng_ust_static_ctx_field( +static const struct lttng_ust_ctx_field *ctx_field = lttng_ust_static_ctx_field( lttng_ust_static_event_field("ipc_ns", lttng_ust_static_type_integer(sizeof(ino_t) * CHAR_BIT, lttng_ust_rb_alignof(ino_t) * CHAR_BIT, @@ -151,9 +151,11 @@ error_find_context: } /* - * * Force a read (imply TLS fixup for dlopen) of TLS variables. - * */ -void lttng_fixup_ipc_ns_tls(void) + * Force a read (imply TLS allocation for dlopen) of TLS variables. + */ +void lttng_ust_ipc_ns_init_thread(int flags) { asm volatile ("" : : "m" (URCU_TLS(cached_ipc_ns))); + if (flags & LTTNG_UST_INIT_THREAD_CONTEXT_CACHE) + (void)get_ipc_ns(); }