int lttng_event_notifier_enabler_attach_capture_bytecode(
struct lttng_event_notifier_enabler *event_notifier_enabler,
- struct lttng_ust_bytecode_node *bytecode)
+ struct lttng_ust_bytecode_node **bytecode)
{
- bytecode->enabler = lttng_event_notifier_enabler_as_enabler(
+ (*bytecode)->enabler = lttng_event_notifier_enabler_as_enabler(
event_notifier_enabler);
- cds_list_add_tail(&bytecode->node,
+ cds_list_add_tail(&(*bytecode)->node,
&event_notifier_enabler->capture_bytecode_head);
+ /* Take ownership of bytecode */
+ *bytecode = NULL;
event_notifier_enabler->num_captures++;
lttng_event_notifier_group_sync_enablers(event_notifier_enabler->group);
case LTTNG_UST_CAPTURE:
return lttng_event_notifier_enabler_attach_capture_bytecode(
event_notifier_enabler,
- (struct lttng_ust_bytecode_node *) arg);
+ (struct lttng_ust_bytecode_node **) arg);
case LTTNG_UST_ENABLE:
return lttng_event_notifier_enabler_enable(event_notifier_enabler);
case LTTNG_UST_DISABLE:
LTTNG_HIDDEN
int lttng_event_notifier_enabler_attach_capture_bytecode(
struct lttng_event_notifier_enabler *event_notifier_enabler,
- struct lttng_ust_bytecode_node *bytecode);
+ struct lttng_ust_bytecode_node **bytecode);
/*
* Attach exclusion list to `struct lttng_event_notifier_enabler` and all