X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=include%2Flttng%2Flocation-internal.h;fp=include%2Flttng%2Flocation-internal.h;h=45bd78a36a86e9657a23d26453a811e38541edcd;hp=d33cab652668c38d713c801bc71df132f953fbbe;hb=d37406195ec30adfb1bd903e3ee8dfdda79700ef;hpb=8f4456a81185bd5c97cac55114a2888a194ca42f diff --git a/include/lttng/location-internal.h b/include/lttng/location-internal.h index d33cab652..45bd78a36 100644 --- a/include/lttng/location-internal.h +++ b/include/lttng/location-internal.h @@ -13,8 +13,16 @@ #include #include #include +#include +/* + * The public API assumes that trace archive locations are always + * provided as "constant". This means that the user of liblttng-ctl never + * has to destroy a trace archive location. Hence, users of liblttng-ctl + * have no visibility of the reference counting of archive locations. + */ struct lttng_trace_archive_location { + struct urcu_ref ref; enum lttng_trace_archive_location_type type; union { struct { @@ -88,7 +96,11 @@ ssize_t lttng_trace_archive_location_serialize( struct lttng_dynamic_buffer *buffer); LTTNG_HIDDEN -void lttng_trace_archive_location_destroy( +void lttng_trace_archive_location_get( + struct lttng_trace_archive_location *location); + +LTTNG_HIDDEN +void lttng_trace_archive_location_put( struct lttng_trace_archive_location *location); #endif /* LTTNG_LOCATION_INTERNAL_H */