#include "lttng-sessiond.h"
#include "notification-thread-commands.h"
-
/*
* Hash table match function for event in the registry.
*/
{
const struct ust_registry_event *key;
struct ust_registry_event *event;
- int i;
LTTNG_ASSERT(node);
LTTNG_ASSERT(_key);
goto no_match;
}
- /* Compare the number of fields. */
- if (event->nr_fields != key->nr_fields) {
+ /* Compare the arrays of fields. */
+ if (!match_lttng_ust_ctl_field_array(event->fields, event->nr_fields,
+ key->fields, key->nr_fields)) {
goto no_match;
}
- /* Compare each field individually. */
- for (i = 0; i < event->nr_fields; i++) {
- if (!match_lttng_ust_ctl_field(&event->fields[i], &key->fields[i])) {
- goto no_match;
- }
- }
-
/* Compare model URI. */
if (event->model_emf_uri != NULL && key->model_emf_uri == NULL) {
goto no_match;
call_rcu(®_enum->rcu_head, destroy_enum_rcu);
}
-/*
- * We need to execute ht_destroy outside of RCU read-side critical
- * section and outside of call_rcu thread, so we postpone its execution
- * using ht_cleanup_push. It is simpler than to change the semantic of
- * the many callers of delete_ust_app_session().
- */
static
void destroy_channel_rcu(struct rcu_head *head)
{
caa_container_of(head, struct ust_registry_channel, rcu_head);
if (chan->ht) {
- ht_cleanup_push(chan->ht);
+ lttng_ht_destroy(chan->ht);
}
free(chan->ctx_fields);
free(chan);
destroy_channel(chan, true);
}
rcu_read_unlock();
- ht_cleanup_push(reg->channels);
+ lttng_ht_destroy(reg->channels);
}
free(reg->metadata);
ust_registry_destroy_enum(reg, reg_enum);
}
rcu_read_unlock();
- ht_cleanup_push(reg->enums);
+ lttng_ht_destroy(reg->enums);
}
}