Introduce channel timer lock
[lttng-tools.git] / src / common / consumer.h
index 18f64b6ef4ad5ca7e6bb05e7310a2e324e92b71a..bedc8885dbc97e6c67faa5f5d5a41917eabf7531 100644 (file)
@@ -172,12 +172,29 @@ struct lttng_consumer_channel {
        /*
         * Channel lock.
         *
+        * This lock protects against concurrent update of channel.
+        *
         * This is nested INSIDE the consumer data lock.
+        * This is nested OUTSIDE the channel timer lock.
         * This is nested OUTSIDE the metadata cache lock.
         * This is nested OUTSIDE stream lock.
         * This is nested OUTSIDE consumer_relayd_sock_pair lock.
         */
        pthread_mutex_t lock;
+
+       /*
+        * Channel teardown lock.
+        *
+        * This lock protect against teardown of channel. It is _never_
+        * taken by the timer handler.
+        *
+        * This is nested INSIDE the consumer data lock.
+        * This is nested INSIDE the channel lock.
+        * This is nested OUTSIDE the metadata cache lock.
+        * This is nested OUTSIDE stream lock.
+        * This is nested OUTSIDE consumer_relayd_sock_pair lock.
+        */
+       pthread_mutex_t timer_lock;
 };
 
 /*
@@ -258,6 +275,7 @@ struct lttng_consumer_stream {
         * This is nested INSIDE the consumer_data lock.
         * This is nested INSIDE the metadata cache lock.
         * This is nested INSIDE the channel lock.
+        * This is nested INSIDE the channel timer lock.
         * This is nested OUTSIDE consumer_relayd_sock_pair lock.
         */
        pthread_mutex_t lock;
This page took 0.023441 seconds and 4 git commands to generate.