From: David Goulet Date: Mon, 22 Oct 2012 21:18:44 +0000 (-0400) Subject: Add stream lock comment for nesting X-Git-Tag: v2.1.0-rc6~28 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=63281d5d013d47087217291ba7724d8302fd63e4 Add stream lock comment for nesting Signed-off-by: David Goulet --- 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;