Use compiler-agnostic defines to silence warning
[lttng-tools.git] / src / bin / lttng-relayd / viewer-session.hpp
index 301b8ffc7ff1c41738c3e94b6d7b0cb01c173513..728676b9509f417ed7f2b899cc2ed44d56cd70c8 100644 (file)
 #include <urcu/ref.h>
 
 struct relay_viewer_session {
 #include <urcu/ref.h>
 
 struct relay_viewer_session {
+       /*
+        * The id of the relay viewer session. Uses the associated connection's socket FD.
+        */
+       uint64_t id;
        /*
         * Session list. Updates are protected by the session_list_lock.
         * Traversals are protected by RCU.
        /*
         * Session list. Updates are protected by the session_list_lock.
         * Traversals are protected by RCU.
@@ -31,6 +35,20 @@ struct relay_viewer_session {
         */
        struct cds_list_head session_list; /* RCU list. */
        pthread_mutex_t session_list_lock; /* Protects list updates. */
         */
        struct cds_list_head session_list; /* RCU list. */
        pthread_mutex_t session_list_lock; /* Protects list updates. */
+       /*
+        * Unannounced stream list. Updates are protected by the
+        * unannounced_stream_list_lock. This lock nests inside
+        * the following locks (in order): relay session, ctf_trace,
+        * and relay stream.
+        *
+        * Traversals are protected by RCU.
+        */
+       struct cds_list_head unannounced_stream_list;
+       pthread_mutex_t unannounced_stream_list_lock;
+       /*
+        * Node in the global viewer sessions hashtable.
+        */
+       struct lttng_ht_node_u64 viewer_session_n;
        /*
         * The viewer session's current trace chunk is initially set, when
         * a viewer attaches to the viewer session, to a copy the corresponding
        /*
         * The viewer session's current trace chunk is initially set, when
         * a viewer attaches to the viewer session, to a copy the corresponding
@@ -61,7 +79,7 @@ struct relay_viewer_session {
        struct lttng_trace_chunk *current_trace_chunk;
 };
 
        struct lttng_trace_chunk *current_trace_chunk;
 };
 
-struct relay_viewer_session *viewer_session_create(void);
+struct relay_viewer_session *viewer_session_create();
 void viewer_session_destroy(struct relay_viewer_session *vsession);
 void viewer_session_close(struct relay_viewer_session *vsession);
 
 void viewer_session_destroy(struct relay_viewer_session *vsession);
 void viewer_session_close(struct relay_viewer_session *vsession);
 
This page took 0.023801 seconds and 4 git commands to generate.