From 63281d5d013d47087217291ba7724d8302fd63e4 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Mon, 22 Oct 2012 17:18:44 -0400 Subject: [PATCH] Add stream lock comment for nesting Signed-off-by: David Goulet --- src/common/consumer.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/common/consumer.h b/src/common/consumer.h index df002f81a..53b615182 100644 --- a/src/common/consumer.h +++ b/src/common/consumer.h @@ -141,7 +141,12 @@ struct lttng_consumer_stream { uint64_t relayd_stream_id; /* Next sequence number to use for trace packet */ uint64_t next_net_seq_num; - /* Lock to use the stream FDs since they are used between threads. */ + /* + * Lock to use the stream FDs since they are used between threads. Using + * this lock with network streaming, when using the control mutex of a + * consumer_relayd_sock_pair, make sure to acquire this lock BEFORE locking + * it and releasing it AFTER the control mutex unlock. + */ pthread_mutex_t lock; /* Tracing session id */ uint64_t session_id; -- 2.34.1