X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fconsumer%2Fconsumer-metadata-cache.h;h=a442dcaf25fe72f1a9fa08d4bf85bca145d95030;hp=8ce7f30b19ee7d795af047ca35f78fbf9b7f3ecb;hb=e2d1190b9ea09c54e5d7373643d62e2034bc1531;hpb=c8fea79c745d42ea8143b7020ae11b4fc2da0d8a diff --git a/src/common/consumer/consumer-metadata-cache.h b/src/common/consumer/consumer-metadata-cache.h index 8ce7f30b1..a442dcaf2 100644 --- a/src/common/consumer/consumer-metadata-cache.h +++ b/src/common/consumer/consumer-metadata-cache.h @@ -1,19 +1,9 @@ /* - * Copyright (C) 2013 - Julien Desfossez - * David Goulet + * Copyright (C) 2013 Julien Desfossez + * Copyright (C) 2013 David Goulet * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2 only, - * as published by the Free Software Foundation. + * SPDX-License-Identifier: GPL-2.0-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 General Public License for - * more details. - * - * You should have received a copy of the GNU 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 CONSUMER_METADATA_CACHE_H @@ -24,6 +14,10 @@ struct consumer_metadata_cache { char *data; uint64_t cache_alloc_size; + /* + * Current version of the metadata cache. + */ + uint64_t version; /* * The upper-limit of data written inside the buffer. * @@ -42,10 +36,12 @@ struct consumer_metadata_cache { }; int consumer_metadata_cache_write(struct lttng_consumer_channel *channel, - unsigned int offset, unsigned int len, char *data); + unsigned int offset, unsigned int len, uint64_t version, + char *data); int consumer_metadata_cache_allocate(struct lttng_consumer_channel *channel); void consumer_metadata_cache_destroy(struct lttng_consumer_channel *channel); int consumer_metadata_cache_flushed(struct lttng_consumer_channel *channel, uint64_t offset, int timer); +int consumer_metadata_wakeup_pipe(const struct lttng_consumer_channel *channel); #endif /* CONSUMER_METADATA_CACHE_H */