X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fconsumer.h;h=a0b2a7efe5ef5861f3a06bf21e2589783a8cfffc;hb=6ca1a6b0dc9c72eeb6451a5a5f4cbf468c4de08c;hp=8751f234e31605188294c809d9fef593a82d8198;hpb=b011a0877c5e3c10c44419f397ed6a9cc43ac41f;p=lttng-tools.git diff --git a/src/common/consumer.h b/src/common/consumer.h index 8751f234e..a0b2a7efe 100644 --- a/src/common/consumer.h +++ b/src/common/consumer.h @@ -160,12 +160,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; }; /* @@ -238,6 +255,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;