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;
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,
{
int ret = 0;
+ lttng_ust_fixup_tls();
+
/*
* If version mismatch, don't register, but don't trigger assert
* on caller. The version check just prints an error.
void lttng_probe_unregister(struct lttng_probe_desc *desc)
{
+ lttng_ust_fixup_tls();
+
if (!check_provider_version(desc))
return;
void lttng_ust_dummy_get_value(struct lttng_ctx_field *field,
struct lttng_ctx_value *value);
int lttng_context_is_app(const char *name);
+void lttng_ust_fixup_tls(void);
#endif /* _LTTNG_TRACER_CORE_H */
rcu_read_unlock();
}
+void lttng_ust_fixup_tls(void)
+{
+ lttng_fixup_urcu_bp_tls();
+ lttng_fixup_ringbuffer_tls();
+ lttng_fixup_vtid_tls();
+ lttng_fixup_nest_count_tls();
+ lttng_fixup_procname_tls();
+ lttng_fixup_ust_mutex_nest_tls();
+}
+
int lttng_get_notify_socket(void *owner)
{
struct sock_info *info = owner;
int sock, ret, prev_connect_failed = 0, has_waited = 0;
long timeout;
+ lttng_ust_fixup_tls();
/*
* If available, add '-ust' to the end of this thread's
* process name
* to be the dynamic linker mutex) and ust_lock, taken within
* the ust lock.
*/
- lttng_fixup_urcu_bp_tls();
- lttng_fixup_ringbuffer_tls();
- lttng_fixup_vtid_tls();
- lttng_fixup_nest_count_tls();
- lttng_fixup_procname_tls();
- lttng_fixup_ust_mutex_nest_tls();
+ lttng_ust_fixup_tls();
lttng_ust_loaded = 1;
sigset_t all_sigs;
int ret;
+ /* Fixup lttng-ust TLS. */
+ lttng_ust_fixup_tls();
+
if (URCU_TLS(lttng_ust_nest_count))
return;
/* Disable signals */