From 13a7bce327fb908d2ddafba17cadebbb13389f12 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 2 Jun 2016 05:03:26 -0400 Subject: [PATCH] Docs: document safety of consumer_thread_is_ready access MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 916a2b769..fc954d28d 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -2371,7 +2371,12 @@ static int spawn_consumer_thread(struct consumer_data *consumer_data) int ret, clock_ret; struct timespec timeout; - /* Make sure we set the readiness flag to 0 because we are NOT ready */ + /* + * Make sure we set the readiness flag to 0 because we are NOT ready. + * This access to consumer_thread_is_ready does not need to be + * protected by consumer_data.cond_mutex (yet) since the consumer + * management thread has not been started at this point. + */ consumer_data->consumer_thread_is_ready = 0; /* Setup pthread condition */ -- 2.34.1