- struct cds_list_head recv_list;
-
- /* Added to the corresponding ctf_trace. */
- struct cds_list_head trace_list;
- struct rcu_head rcu_node;
- uint64_t session_id;
- int fd;
- /* FD on which to write the index data. */
- int index_fd;
- /* FD on which to read the index data for the viewer. */
- int read_index_fd;
+ pthread_mutex_t reflock;
+ struct urcu_ref ref;
+ /* Back reference to trace. Protected by refcount on trace object. */
+ struct ctf_trace *trace;
+
+ /*
+ * To protect from concurrent read/update. The viewer stream
+ * lock nests inside the stream lock. The stream lock nests
+ * inside the ctf_trace lock.
+ */
+ pthread_mutex_t lock;
+ uint64_t prev_seq; /* previous data sequence number encountered. */
+ uint64_t last_net_seq_num; /* seq num to encounter before closing. */
+
+ /* FD on which to write the stream data. */
+ struct stream_fd *stream_fd;
+ /* index file on which to write the index data. */
+ struct lttng_index_file *index_file;