Introduce channel timer lock
[lttng-tools.git] / src / common / consumer-metadata-cache.c
index 4c8a665af0db7aa1d5d8224edcfac96c5fc2fbb2..e21fd4c73cb0b8c4b5d8990500c5d1188909a33e 100644 (file)
@@ -210,6 +210,7 @@ int consumer_metadata_cache_flushed(struct lttng_consumer_channel *channel,
         */
        pthread_mutex_lock(&consumer_data.lock);
        pthread_mutex_lock(&channel->lock);
+       pthread_mutex_lock(&channel->timer_lock);
        pthread_mutex_lock(&channel->metadata_cache->lock);
 
        if (cache->rb_pushed >= offset) {
@@ -230,6 +231,7 @@ int consumer_metadata_cache_flushed(struct lttng_consumer_channel *channel,
        }
 
        pthread_mutex_unlock(&channel->metadata_cache->lock);
+       pthread_mutex_unlock(&channel->timer_lock);
        pthread_mutex_unlock(&channel->lock);
        pthread_mutex_unlock(&consumer_data.lock);
 
This page took 0.023749 seconds and 4 git commands to generate.