X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fconsumer.h;h=6bce96d96946abf263b9bad0bff0d6ff98d8dc49;hb=58b1f4255ea457f2965f31b84205cb0eec21e71f;hp=9a93c427915bbd6de3aef1bdbc9440320244092a;hpb=c80048c6378b9ee7796c4b833a2c07f6050cc6d7;p=lttng-tools.git diff --git a/src/common/consumer.h b/src/common/consumer.h index 9a93c4279..6bce96d96 100644 --- a/src/common/consumer.h +++ b/src/common/consumer.h @@ -275,6 +275,10 @@ struct lttng_consumer_global_data { struct lttng_ht *relayd_ht; }; +/* Defined in consumer.c and coupled with explanations */ +extern struct lttng_ht *metadata_ht; +extern struct lttng_ht *data_ht; + /* * Init consumer data structures. */ @@ -324,10 +328,6 @@ extern void lttng_consumer_sync_trace_file( */ extern int lttng_consumer_poll_socket(struct pollfd *kconsumer_sockpoll); -extern int consumer_update_poll_array( - struct lttng_consumer_local_data *ctx, struct pollfd **pollfd, - struct lttng_consumer_stream **local_consumer_streams); - extern struct lttng_consumer_stream *consumer_allocate_stream( int channel_key, int stream_key, int shm_fd, int wait_fd, @@ -340,8 +340,10 @@ extern struct lttng_consumer_stream *consumer_allocate_stream( int net_index, int metadata_flag, int *alloc_ret); -extern int consumer_add_stream(struct lttng_consumer_stream *stream); -extern void consumer_del_stream(struct lttng_consumer_stream *stream); +extern void consumer_del_stream(struct lttng_consumer_stream *stream, + struct lttng_ht *ht); +extern void consumer_del_metadata_stream(struct lttng_consumer_stream *stream, + struct lttng_ht *ht); extern void consumer_change_stream_state(int stream_key, enum lttng_consumer_stream_state state); extern void consumer_del_channel(struct lttng_consumer_channel *channel); @@ -359,6 +361,7 @@ struct consumer_relayd_sock_pair *consumer_allocate_relayd_sock_pair( struct consumer_relayd_sock_pair *consumer_find_relayd(int key); int consumer_handle_stream_before_relayd(struct lttng_consumer_stream *stream, size_t data_size); +void consumer_steal_stream_key(int key, struct lttng_ht *ht); extern struct lttng_consumer_local_data *lttng_consumer_create( enum lttng_consumer_type type, @@ -382,8 +385,9 @@ extern int lttng_consumer_get_produced_snapshot( struct lttng_consumer_local_data *ctx, struct lttng_consumer_stream *stream, unsigned long *pos); -extern void *lttng_consumer_thread_poll_fds(void *data); -extern void *lttng_consumer_thread_receive_fds(void *data); +extern void *consumer_thread_metadata_poll(void *data); +extern void *consumer_thread_data_poll(void *data); +extern void *consumer_thread_sessiond_poll(void *data); extern int lttng_consumer_recv_cmd(struct lttng_consumer_local_data *ctx, int sock, struct pollfd *consumer_sockpoll);