Fix: add missing metadata socket lock
[lttng-tools.git] / src / common / consumer.h
index 3a0c6c8d8f5e3a737e9ce6da64c3fb4e09c4dd21..5a11950084bce1f36625ff0ce7809c31ca5eae71 100644 (file)
@@ -290,6 +290,16 @@ struct lttng_consumer_stream {
         * acquired in the destroy path.
         */
        unsigned int globally_visible;
+       /*
+        * Pipe to wake up the metadata poll thread when the UST metadata
+        * cache is updated.
+        */
+       int ust_metadata_poll_pipe[2];
+       /*
+        * How much metadata was read from the metadata cache and sent
+        * to the channel.
+        */
+       uint64_t ust_metadata_pushed;
 };
 
 /*
@@ -386,8 +396,10 @@ struct lttng_consumer_local_data {
        enum lttng_consumer_type type;
        /* socket to communicate errors with sessiond */
        int consumer_error_socket;
-       /* socket to ask metadata to sessiond */
+       /* socket to ask metadata to sessiond. */
        int consumer_metadata_socket;
+       /* Protect consumer_metadata_socket. */
+       pthread_mutex_t metadata_socket_lock;
        /* socket to exchange commands with sessiond */
        char *consumer_command_sock_path;
        /* communication with splice */
This page took 0.024026 seconds and 4 git commands to generate.