X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-context-provider.c;h=b3fc21defd48bedecf3d60859c0c0a24675cf07f;hb=864a1eda22ed99266509ac76451c6f27f91aa17e;hp=edb1e9b2e076a4297653b010b87978e5eb67c07d;hpb=b4051ad8c170901d5297e1b3005b24e63cb0ab1e;p=lttng-ust.git diff --git a/liblttng-ust/lttng-context-provider.c b/liblttng-ust/lttng-context-provider.c index edb1e9b2..b3fc21de 100644 --- a/liblttng-ust/lttng-context-provider.c +++ b/liblttng-ust/lttng-context-provider.c @@ -1,33 +1,23 @@ /* - * lttng-context-provider.c - * - * LTTng UST application context provider. + * SPDX-License-Identifier: LGPL-2.1-only * * Copyright (C) 2016 Mathieu Desnoyers * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; only - * version 2.1 of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * LTTng UST application context provider. */ #define _LGPL_SOURCE #include +#include #include #include -#include + +#include + #include "lttng-tracer-core.h" #include "jhash.h" -#include +#include "context-provider-internal.h" +#include #define CONTEXT_PROVIDER_HT_BITS 12 #define CONTEXT_PROVIDER_HT_SIZE (1U << CONTEXT_PROVIDER_HT_BITS) @@ -88,9 +78,14 @@ int lttng_ust_context_provider_register(struct lttng_ust_context_provider *provi hash = jhash(provider->name, name_len, 0); head = &context_provider_ht.table[hash & (CONTEXT_PROVIDER_HT_SIZE - 1)]; cds_hlist_add_head(&provider->node, head); + lttng_ust_context_set_session_provider(provider->name, provider->get_size, provider->record, provider->get_value); + + lttng_ust_context_set_event_notifier_group_provider(provider->name, + provider->get_size, provider->record, + provider->get_value); end: ust_unlock(); return ret; @@ -105,6 +100,11 @@ void lttng_ust_context_provider_unregister(struct lttng_ust_context_provider *pr lttng_ust_context_set_session_provider(provider->name, lttng_ust_dummy_get_size, lttng_ust_dummy_record, lttng_ust_dummy_get_value); + + lttng_ust_context_set_event_notifier_group_provider(provider->name, + lttng_ust_dummy_get_size, lttng_ust_dummy_record, + lttng_ust_dummy_get_value); + cds_hlist_del(&provider->node); end: ust_unlock();