X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fcommon%2Fconsumer%2Fconsumer-stream.cpp;h=0742c865296bad5754c074afb88a6ef08eea8a20;hb=refs%2Fheads%2Fmaster;hp=ab9b39111a02580bd176baac55b7c3b95379d123;hpb=56047f5a23df5c2c583a102b8015bbec5a7da9f1;p=lttng-tools.git diff --git a/src/common/consumer/consumer-stream.cpp b/src/common/consumer/consumer-stream.cpp index ab9b39111..e65592055 100644 --- a/src/common/consumer/consumer-stream.cpp +++ b/src/common/consumer/consumer-stream.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -372,7 +373,7 @@ int consumer_stream_sync_metadata(struct lttng_consumer_local_data *ctx, uint64_ /* Ease our life a bit. */ ht = the_consumer_data.stream_list_ht; - lttng::urcu::read_lock_guard read_lock; + const lttng::urcu::read_lock_guard read_lock; /* Search the metadata associated with the session id of the given stream. */ @@ -642,7 +643,7 @@ struct lttng_consumer_stream *consumer_stream_create(struct lttng_consumer_chann { int ret; struct lttng_consumer_stream *stream; - lttng::urcu::read_lock_guard read_lock; + const lttng::urcu::read_lock_guard read_lock; stream = zmalloc(); if (stream == nullptr) { @@ -850,7 +851,7 @@ void consumer_stream_close_output(struct lttng_consumer_stream *stream) stream->trace_chunk = nullptr; /* Check and cleanup relayd if needed. */ - lttng::urcu::read_lock_guard read_lock; + const lttng::urcu::read_lock_guard read_lock; relayd = consumer_find_relayd(stream->net_seq_idx); if (relayd != nullptr) { consumer_stream_relayd_close(stream, relayd); @@ -873,7 +874,7 @@ void consumer_stream_delete(struct lttng_consumer_stream *stream, struct lttng_h /* Should NEVER be called not in monitor mode. */ LTTNG_ASSERT(stream->chan->monitor); - lttng::urcu::read_lock_guard read_lock; + const lttng::urcu::read_lock_guard read_lock; if (ht) { iter.iter.node = &stream->node.node; @@ -1092,7 +1093,7 @@ int consumer_stream_write_index(struct lttng_consumer_stream *stream, LTTNG_ASSERT(stream); LTTNG_ASSERT(element); - lttng::urcu::read_lock_guard read_lock; + const lttng::urcu::read_lock_guard read_lock; if (stream->net_seq_idx != (uint64_t) -1ULL) { struct consumer_relayd_sock_pair *relayd; relayd = consumer_find_relayd(stream->net_seq_idx);