From: Jérémie Galarneau Date: Thu, 2 Jun 2016 09:03:26 +0000 (-0400) Subject: Docs: document safety of consumer_thread_is_ready access X-Git-Tag: v2.9.0-rc1~145 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=13a7bce327fb908d2ddafba17cadebbb13389f12 Docs: document safety of consumer_thread_is_ready access Signed-off-by: Jérémie Galarneau --- 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 */