Fix: handle new streams in live mode in relayd
[lttng-tools.git] / src / bin / lttng-relayd / lttng-relayd.h
index 4d23615676bcb9def4560e570305400597c8e7b4..b5e7c75fdd4b901140c9ec91088791cd1b9f599b 100644 (file)
@@ -83,6 +83,18 @@ struct relay_session {
         */
        uint64_t minor;
        uint64_t major;
+       /*
+        * Flag checked and exchanged with uatomic_cmpxchg to tell the
+        * viewer-side if new streams got added since the last check.
+        */
+       unsigned long new_streams;
+
+       /*
+        * Used to synchronize the process where we flag every streams readiness
+        * for the viewer when the streams_sent message is received and the viewer
+        * process of sending those streams.
+        */
+       pthread_mutex_t viewer_ready_lock;
 };
 
 /*
@@ -203,6 +215,8 @@ struct relay_viewer_stream {
         * it sets this flag to inform that it is a normal error.
         */
        unsigned int abort_flag:1;
+       /* Indicates if this stream has been sent to a viewer client. */
+       unsigned int sent_flag:1;
 };
 
 /*
@@ -239,6 +253,8 @@ extern const char *tracing_group_name;
 
 extern const char * const config_section_name;
 
+extern int thread_quit_pipe[2];
+
 struct relay_stream *relay_stream_find_by_id(uint64_t stream_id);
 void lttng_relay_notify_ready(void);
 
This page took 0.023 seconds and 4 git commands to generate.