X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Ftrace-chunk-registry.h;h=00dd7fcf0343ebd8a38aa50f8189fdb91bdb55eb;hp=23df91a3eca24a13ac64b0eb3a0a5d9b983d5ebf;hb=4062406e2a957323852dca73a41e0239f6b9df03;hpb=e10aec8f225c0822811c65401710a039d7e2d7d7 diff --git a/src/common/trace-chunk-registry.h b/src/common/trace-chunk-registry.h index 23df91a3e..00dd7fcf0 100644 --- a/src/common/trace-chunk-registry.h +++ b/src/common/trace-chunk-registry.h @@ -1,18 +1,8 @@ /* - * Copyright (C) 2019 - Jérémie Galarneau + * Copyright (C) 2019 Jérémie Galarneau * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License, version 2.1 only, - * as published by the Free Software Foundation. + * SPDX-License-Identifier: LGPL-2.1-only * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef LTTNG_TRACE_CHUNK_REGISTRY_H @@ -83,6 +73,16 @@ lttng_trace_chunk_registry_find_chunk( const struct lttng_trace_chunk_registry *registry, uint64_t session_id, uint64_t chunk_id); +/* + * Query the existence of a trace chunk by session_id and chunk_id. + * + * Returns 0 on success, a negative value on error. + */ +LTTNG_HIDDEN +int lttng_trace_chunk_registry_chunk_exists( + const struct lttng_trace_chunk_registry *registry, + uint64_t session_id, uint64_t chunk_id, bool *chunk_exists); + /* * Look-up an anonymous trace chunk by session_id. * A reference is acquired on behalf of the caller. @@ -97,6 +97,6 @@ lttng_trace_chunk_registry_find_anonymous_chunk( LTTNG_HIDDEN unsigned int lttng_trace_chunk_registry_put_each_chunk( - struct lttng_trace_chunk_registry *registry); + const struct lttng_trace_chunk_registry *registry); #endif /* LTTNG_TRACE_CHUNK_REGISTRY_H */