Implement event notifier
[deliverable/lttng-ust.git] / liblttng-ust / lttng-context-provider.c
index 50f73c6253cf340d90485540ce154dfdafd24d72..fe831366779a0332531fcfad63769742481549a0 100644 (file)
 #include <unistd.h>
 
 #include <lttng/ust-context-provider.h>
+
 #include "lttng-tracer-core.h"
 #include "jhash.h"
+#include "context-provider-internal.h"
 #include <helper.h>
 
 #define CONTEXT_PROVIDER_HT_BITS       12
@@ -90,9 +92,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;
@@ -107,6 +114,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();
This page took 0.02389 seconds and 5 git commands to generate.