X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-context-provider.c;h=e6749beeda6b42d4b8e0a267c1f555f18e1aaaa4;hb=a3b964ebc0510bacc9af2d729f1a68c2e3ccc95d;hp=6c067e2fecae06548a3d4495ef9477b2495a6a5b;hpb=38a7bf26121aa474821d215c4d8c583be531d40d;p=lttng-ust.git diff --git a/liblttng-ust/lttng-context-provider.c b/liblttng-ust/lttng-context-provider.c index 6c067e2f..e6749bee 100644 --- a/liblttng-ust/lttng-context-provider.c +++ b/liblttng-ust/lttng-context-provider.c @@ -67,6 +67,8 @@ int lttng_ust_context_provider_register(struct lttng_ust_context_provider *provi uint32_t hash; int ret = 0; + lttng_ust_fixup_tls(); + /* Provider name starts with "$app.". */ if (strncmp("$app.", provider->name, strlen("$app.") != 0)) return -EINVAL; @@ -94,6 +96,8 @@ end: void lttng_ust_context_provider_unregister(struct lttng_ust_context_provider *provider) { + lttng_ust_fixup_tls(); + if (ust_lock()) goto end; lttng_ust_context_set_session_provider(provider->name,