From 7f725ec5735e080b377f9c3459664fac0ec2baff Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 15 Jul 2013 20:03:15 -0400 Subject: [PATCH] document consumer_metadata_cache_flushed use of consumer_data.lock Reviewed-by: Julien Desfossez Signed-off-by: Mathieu Desnoyers --- src/common/consumer-metadata-cache.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common/consumer-metadata-cache.c b/src/common/consumer-metadata-cache.c index c6e6c6b16..4c8a665af 100644 --- a/src/common/consumer-metadata-cache.c +++ b/src/common/consumer-metadata-cache.c @@ -203,6 +203,11 @@ int consumer_metadata_cache_flushed(struct lttng_consumer_channel *channel, cache = channel->metadata_cache; + /* + * XXX This consumer_data.lock should eventually be replaced by + * a channel lock. It protects metadata_stream read and endpoint + * status check. + */ pthread_mutex_lock(&consumer_data.lock); pthread_mutex_lock(&channel->lock); pthread_mutex_lock(&channel->metadata_cache->lock); -- 2.34.1