From: Mathieu Desnoyers Date: Tue, 7 Nov 2017 14:37:46 +0000 (-0500) Subject: Revert "Fix: typo: DECLARE_URCU_TLS_IE -> DEFINE_URCU_TLS_IE" X-Git-Tag: v2.11.0-rc1~36 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9b3a9a1f8ee47787e50a130b444dae38eee5dca0;p=lttng-ust.git Revert "Fix: typo: DECLARE_URCU_TLS_IE -> DEFINE_URCU_TLS_IE" This reverts commit 364979886a80f7c993b3210af48a93f7d65f4530. The initial-exec model seems to behave differently than global-dynamic with respect to lazy initialization, causing locks to be taken then first time each thread touch the TLS. This introduces deadlocks with library constructors waiting on other threads. This will require further investigation. Signed-off-by: Mathieu Desnoyers --- diff --git a/liblttng-ust-java-agent/jni/common/lttng_ust_context.c b/liblttng-ust-java-agent/jni/common/lttng_ust_context.c index e4e000a8..e9b6da28 100644 --- a/liblttng-ust-java-agent/jni/common/lttng_ust_context.c +++ b/liblttng-ust-java-agent/jni/common/lttng_ust_context.c @@ -57,7 +57,7 @@ struct lttng_ust_jni_ctx_entry { } __attribute__((packed)); /* TLS passing context info from JNI to callbacks. */ -DEFINE_URCU_TLS_IE(struct lttng_ust_jni_tls, lttng_ust_context_info_tls); +DECLARE_URCU_TLS_IE(struct lttng_ust_jni_tls, lttng_ust_context_info_tls); static const char *get_ctx_string_at_offset(int32_t offset) {