X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fconsumer%2Fconsumer.h;h=eb9b8c4635c1c685322dccf4e439f8e59babb2a8;hp=6a38e50e55a0a5a9b8c3d6eea784a718379b594d;hb=66d583dc40af49e00d85385eb6f148c0fe3f7d50;hpb=cf0bcb51ea857687a353d2851e572dba6cc63cb0 diff --git a/src/common/consumer/consumer.h b/src/common/consumer/consumer.h index 6a38e50e5..eb9b8c463 100644 --- a/src/common/consumer/consumer.h +++ b/src/common/consumer/consumer.h @@ -224,6 +224,8 @@ struct lttng_consumer_channel { uint64_t discarded_events; /* Total number of missed packets due to overwriting (overwrite). */ uint64_t lost_packets; + + bool streams_sent_to_relayd; }; /* @@ -602,6 +604,18 @@ struct lttng_consumer_global_data { struct lttng_ht *stream_per_chan_id_ht; }; +/* + * Set to nonzero when the consumer is exiting. Updated by signal + * handler and thread exit, read by threads. + */ +extern int consumer_quit; + +/* + * Set to nonzero when the consumer is exiting. Updated by signal + * handler and thread exit, read by threads. + */ +extern int consumer_quit; + /* Flag used to temporarily pause data consumption from testpoints. */ extern int data_consumption_paused; @@ -724,7 +738,7 @@ int lttng_consumer_recv_cmd(struct lttng_consumer_local_data *ctx, ssize_t lttng_consumer_read_subbuffer(struct lttng_consumer_stream *stream, struct lttng_consumer_local_data *ctx); int lttng_consumer_on_recv_stream(struct lttng_consumer_stream *stream); -int consumer_add_relayd_socket(uint64_t net_seq_idx, int sock_type, +void consumer_add_relayd_socket(uint64_t net_seq_idx, int sock_type, struct lttng_consumer_local_data *ctx, int sock, struct pollfd *consumer_sockpoll, struct lttcomm_relayd_sock *relayd_sock, uint64_t sessiond_id, uint64_t relayd_session_id); @@ -740,9 +754,9 @@ void consumer_destroy_relayd(struct consumer_relayd_sock_pair *relayd); unsigned long consumer_get_consume_start_pos(unsigned long consumed_pos, unsigned long produced_pos, uint64_t nb_packets_per_stream, uint64_t max_sb_size); -int consumer_add_data_stream(struct lttng_consumer_stream *stream); +void consumer_add_data_stream(struct lttng_consumer_stream *stream); void consumer_del_stream_for_data(struct lttng_consumer_stream *stream); -int consumer_add_metadata_stream(struct lttng_consumer_stream *stream); +void consumer_add_metadata_stream(struct lttng_consumer_stream *stream); void consumer_del_stream_for_metadata(struct lttng_consumer_stream *stream); int consumer_create_index_file(struct lttng_consumer_stream *stream);