X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Flttng-relayd.h;h=b5e7c75fdd4b901140c9ec91088791cd1b9f599b;hb=80e8027abb847655ebe43b2b5aec1a5141bb9668;hp=c08c17a4faf83d552d7d43ebe79610adf7d307d3;hpb=0b242f6253f75bd4a2d138fba3c34a22653ab3bd;p=lttng-tools.git diff --git a/src/bin/lttng-relayd/lttng-relayd.h b/src/bin/lttng-relayd/lttng-relayd.h index c08c17a4f..b5e7c75fd 100644 --- a/src/bin/lttng-relayd/lttng-relayd.h +++ b/src/bin/lttng-relayd/lttng-relayd.h @@ -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; }; /*