X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=include%2Flttng%2Ftrigger%2Ftrigger-internal.h;h=c58787ceb2cfb506a7280e02ccf6b6425783ea19;hb=a5c2d2a71919b8d1542b62f6d32579125cc2c8f8;hp=5bab4c7634c9a096a0819085cd49ccef063fdd8d;hpb=588c4b0d153e8919b8d9159b69ce0db8fbe52af0;p=lttng-tools.git diff --git a/include/lttng/trigger/trigger-internal.h b/include/lttng/trigger/trigger-internal.h index 5bab4c763..c58787ceb 100644 --- a/include/lttng/trigger/trigger-internal.h +++ b/include/lttng/trigger/trigger-internal.h @@ -190,6 +190,12 @@ enum lttng_error_code lttng_trigger_generate_bytecode( struct lttng_trigger *trigger, const struct lttng_credentials *creds); +/* + * Note that the trigger object is not locked by "copy" as it is const and + * used with a number of 'const' triggers. If the trigger could be shared at + * the moment of the copy, it is the caller's responsability to lock it for + * the duration of the copy. + */ LTTNG_HIDDEN struct lttng_trigger *lttng_trigger_copy(const struct lttng_trigger *trigger); @@ -236,4 +242,19 @@ enum lttng_trigger_status lttng_trigger_add_action_error_query_results( struct lttng_trigger *trigger, struct lttng_error_query_results *results); +/* + * Set the trigger name. + * + * A name is optional. + * A name will be assigned on trigger registration if no name is set. + * + * The name is copied. + * + * Return LTTNG_TRIGGER_STATUS_OK on success, LTTNG_TRIGGER_STATUS_INVALID + * if invalid parameters are passed. + */ +LTTNG_HIDDEN +enum lttng_trigger_status lttng_trigger_set_name( + struct lttng_trigger *trigger, const char *name); + #endif /* LTTNG_TRIGGER_INTERNAL_H */