Fix concurrency issues while overwriting tracefiles in live
[lttng-tools.git] / src / bin / lttng-relayd / lttng-relayd.h
index 8039a7ec703d01f4672d32abcc9448ed49fb017a..0af8e0f1d963199b5a6bb82c28b244a33daa6b6c 100644 (file)
@@ -166,6 +166,11 @@ struct relay_viewer_stream {
        struct lttng_ht_node_u64 stream_n;
        struct rcu_head rcu_node;
        struct ctf_trace *ctf_trace;
+       /*
+        * This lock blocks only when the writer is about to start overwriting
+        * a file currently read by the reader.
+        */
+       pthread_mutex_t overwrite_lock;
        /* Information telling us if the stream is a metadata stream. */
        unsigned int metadata_flag:1;
        /*
This page took 0.023634 seconds and 4 git commands to generate.