X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fconsumer.h;h=bedc8885dbc97e6c67faa5f5d5a41917eabf7531;hb=ec6ea7d01adc8a9d1481ba645b282c92ec27208e;hp=18f64b6ef4ad5ca7e6bb05e7310a2e324e92b71a;hpb=f666ae706d924ec91ca8212c402fd514ca572e88;p=lttng-tools.git diff --git a/src/common/consumer.h b/src/common/consumer.h index 18f64b6ef..bedc8885d 100644 --- a/src/common/consumer.h +++ b/src/common/consumer.h @@ -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;