+LTTNG_HIDDEN
+void lttng_action_init(
+ struct lttng_action *action,
+ enum lttng_action_type type,
+ action_validate_cb validate,
+ action_serialize_cb serialize,
+ action_equal_cb equal,
+ action_destroy_cb destroy)
+{
+ urcu_ref_init(&action->ref);
+ action->type = type;
+ action->validate = validate;
+ action->serialize = serialize;
+ action->equal = equal;
+ action->destroy = destroy;
+}
+
+static
+void action_destroy_ref(struct urcu_ref *ref)
+{
+ struct lttng_action *action =
+ container_of(ref, struct lttng_action, ref);
+
+ action->destroy(action);
+}
+
+LTTNG_HIDDEN
+void lttng_action_get(struct lttng_action *action)
+{
+ urcu_ref_get(&action->ref);
+}
+
+LTTNG_HIDDEN
+void lttng_action_put(struct lttng_action *action)