+
+LTTNG_HIDDEN
+void lttng_trigger_get(struct lttng_trigger *trigger)
+{
+ urcu_ref_get(&trigger->ref);
+}
+
+LTTNG_HIDDEN
+void lttng_trigger_put(struct lttng_trigger *trigger)
+{
+ if (!trigger) {
+ return;
+ }
+
+ urcu_ref_put(&trigger->ref , trigger_destroy_ref);
+}
+
+LTTNG_HIDDEN
+const struct lttng_credentials *lttng_trigger_get_credentials(
+ const struct lttng_trigger *trigger)
+{
+ return LTTNG_OPTIONAL_GET_PTR(trigger->creds);
+}
+
+LTTNG_HIDDEN
+void lttng_trigger_set_credentials(
+ struct lttng_trigger *trigger,
+ const struct lttng_credentials *creds)
+{
+ assert(creds);
+ LTTNG_OPTIONAL_SET(&trigger->creds, *creds);
+}