struct lttng_ust_channel_counter_private *chan_counter, *tmpchan_counter;
struct lttng_ust_event_session_common_private *event_priv, *tmpevent_priv;
struct lttng_enum *_enum, *tmp_enum;
- struct lttng_event_enabler_session_common *event_enabler, *event_tmpenabler;
+ struct lttng_event_enabler_common *event_enabler, *event_tmpenabler;
CMM_ACCESS_ONCE(session->active) = 0;
cds_list_for_each_entry(event_priv, &session->priv->events_head, node) {
}
lttng_ust_urcu_synchronize_rcu(); /* Wait for in-flight events to complete */
lttng_ust_tp_probe_prune_release_queue();
- cds_list_for_each_entry_safe(event_enabler, event_tmpenabler,
- &session->priv->enablers_head, node)
- lttng_event_enabler_destroy(&event_enabler->parent);
+ cds_list_for_each_entry_safe(event_enabler, event_tmpenabler, &session->priv->enablers_head, node)
+ lttng_event_enabler_destroy(event_enabler);
cds_list_for_each_entry_safe(event_priv, tmpevent_priv,
&session->priv->events_head, node)
_lttng_event_destroy(event_priv->parent.pub);
struct lttng_event_notifier_group *event_notifier_group)
{
int close_ret;
- struct lttng_event_notifier_enabler *notifier_enabler, *tmpnotifier_enabler;
+ struct lttng_event_enabler_common *event_enabler, *tmpevent_enabler;
struct lttng_ust_event_notifier_private *event_notifier_priv, *tmpevent_notifier_priv;
if (!event_notifier_group) {
lttng_ust_urcu_synchronize_rcu();
- cds_list_for_each_entry_safe(notifier_enabler, tmpnotifier_enabler,
- &event_notifier_group->enablers_head, node)
- lttng_event_enabler_destroy(¬ifier_enabler->parent);
+ cds_list_for_each_entry_safe(event_enabler, tmpevent_enabler, &event_notifier_group->enablers_head, node)
+ lttng_event_enabler_destroy(event_enabler);
cds_list_for_each_entry_safe(event_notifier_priv, tmpevent_notifier_priv,
&event_notifier_group->event_notifiers_head, node)
event_enabler->parent.parent.enabled = 0;
event_enabler->parent.parent.user_token = event_param->token;
event_enabler->parent.chan = chan->parent;
- cds_list_add(&event_enabler->parent.node, &event_enabler->chan->parent->session->priv->enablers_head);
+ cds_list_add(&event_enabler->parent.parent.node, &event_enabler->chan->parent->session->priv->enablers_head);
lttng_session_lazy_sync_event_enablers(event_enabler->chan->parent->session);
return event_enabler;
event_enabler->parent.parent.enabled = 0;
event_enabler->parent.parent.user_token = counter_event->event.token;
event_enabler->parent.chan = chan->parent;
- cds_list_add(&event_enabler->parent.node, &event_enabler->chan->parent->session->priv->enablers_head);
+ cds_list_add(&event_enabler->parent.parent.node, &event_enabler->chan->parent->session->priv->enablers_head);
lttng_session_lazy_sync_event_enablers(event_enabler->chan->parent->session);
return event_enabler;
event_notifier_enabler->parent.enabled = 0;
event_notifier_enabler->group = event_notifier_group;
- cds_list_add(&event_notifier_enabler->node,
- &event_notifier_group->enablers_head);
+ cds_list_add(&event_notifier_enabler->parent.node, &event_notifier_group->enablers_head);
lttng_event_notifier_group_sync_enablers(event_notifier_group);
struct lttng_event_enabler_session_common *enabler_session =
caa_container_of(event_enabler, struct lttng_event_enabler_session_common, parent);
- cds_list_del(&enabler_session->node);
+ cds_list_del(&enabler_session->parent.node);
lttng_destroy_context(enabler_session->ctx);
break;
}
struct lttng_event_notifier_enabler *notifier_enabler =
caa_container_of(event_enabler, struct lttng_event_notifier_enabler, parent);
- cds_list_del(¬ifier_enabler->node);
+ cds_list_del(¬ifier_enabler->parent.node);
free(notifier_enabler);
break;
}
static
void lttng_session_sync_event_enablers(struct lttng_ust_session *session)
{
- struct lttng_event_enabler_session_common *event_enabler;
+ struct lttng_event_enabler_common *event_enabler;
struct lttng_ust_event_session_common_private *event_priv;
- cds_list_for_each_entry(event_enabler, &session->priv->enablers_head, node)
- lttng_event_enabler_ref_events(event_enabler);
+ cds_list_for_each_entry(event_enabler, &session->priv->enablers_head, node) {
+ struct lttng_event_enabler_session_common *event_enabler_session =
+ caa_container_of(event_enabler, struct lttng_event_enabler_session_common, parent);
+
+ lttng_event_enabler_ref_events(event_enabler_session);
+ }
/*
* For each event, if at least one of its enablers is enabled,
* and its channel and session transient states are enabled, we
static
void lttng_event_notifier_group_sync_enablers(struct lttng_event_notifier_group *event_notifier_group)
{
- struct lttng_event_notifier_enabler *event_notifier_enabler;
+ struct lttng_event_enabler_common *event_enabler;
struct lttng_ust_event_notifier_private *event_notifier_priv;
- cds_list_for_each_entry(event_notifier_enabler, &event_notifier_group->enablers_head, node)
+ cds_list_for_each_entry(event_enabler, &event_notifier_group->enablers_head, node) {
+ struct lttng_event_notifier_enabler *event_notifier_enabler =
+ caa_container_of(event_enabler, struct lttng_event_notifier_enabler, parent);
+
lttng_event_notifier_enabler_ref_event_notifiers(event_notifier_enabler);
+ }
/*
* For each event_notifier, if at least one of its enablers is enabled,