* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#define _LGPL_SOURCE
#include <sys/types.h>
#include <unistd.h>
#include <lttng/ust-context-provider.h>
uint32_t hash;
int ret = 0;
+ lttng_ust_fixup_tls();
+
/* Provider name starts with "$app.". */
- if (strncmp("$app.", provider->name, strlen("$app.") != 0))
+ if (strncmp("$app.", provider->name, strlen("$app.")) != 0)
return -EINVAL;
/* Provider name cannot contain a column character. */
if (strchr(provider->name, ':'))
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,