X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-context-provider.c;h=e6749beeda6b42d4b8e0a267c1f555f18e1aaaa4;hb=958b101d6094b3f65f5c434fc7e289fbef2918b9;hp=b5ae3075c075d1c70a797e5014f98ccb92a20d2d;hpb=ce7352a2d029c4cad9fed5e8288568225366152e;p=lttng-ust.git diff --git a/liblttng-ust/lttng-context-provider.c b/liblttng-ust/lttng-context-provider.c index b5ae3075..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; @@ -92,33 +94,10 @@ end: return ret; } -size_t lttng_ust_dummy_get_size(struct lttng_ctx_field *field, size_t offset) -{ - size_t size = 0; - - size += lib_ring_buffer_align(offset, lttng_alignof(char)); - size += sizeof(char); /* tag */ - return size; -} - -void lttng_ust_dummy_record(struct lttng_ctx_field *field, - struct lttng_ust_lib_ring_buffer_ctx *ctx, - struct lttng_channel *chan) -{ - char sel_char = (char) LTTNG_UST_DYNAMIC_TYPE_NONE; - - lib_ring_buffer_align_ctx(ctx, lttng_alignof(sel_char)); - chan->ops->event_write(ctx, &sel_char, sizeof(sel_char)); -} - -void lttng_ust_dummy_get_value(struct lttng_ctx_field *field, - struct lttng_ctx_value *value) -{ - value->sel = LTTNG_UST_DYNAMIC_TYPE_NONE; -} - 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,