X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;ds=inline;f=src%2Fcommon%2Fconsumer.h;h=b4c9aeafd135002c189a1c27e50a5c29a9cc53b2;hb=51230d709a394904ee9c449c26d645e737c4af94;hp=91039e8e956563c3f99d3de6f9cd0ca7dbb98251;hpb=acdb9057878ddbd9c112206f3c1c4c2104093088;p=lttng-tools.git diff --git a/src/common/consumer.h b/src/common/consumer.h index 91039e8e9..b4c9aeafd 100644 --- a/src/common/consumer.h +++ b/src/common/consumer.h @@ -85,6 +85,8 @@ enum consumer_channel_type { CONSUMER_CHANNEL_TYPE_DATA = 1, }; +extern struct lttng_consumer_global_data consumer_data; + struct stream_list { struct cds_list_head head; unsigned int count; @@ -222,6 +224,7 @@ struct lttng_consumer_stream { * Lock to use the stream FDs since they are used between threads. * * This is nested INSIDE the consumer_data lock. + * This is nested INSIDE the metadata cache lock. * This is nested OUTSIDE consumer_relayd_sock_pair lock. */ pthread_mutex_t lock; @@ -351,7 +354,7 @@ struct lttng_consumer_local_data { /* to let the signal handler wake up the fd receiver thread */ int consumer_should_quit[2]; /* Metadata poll thread pipe. Transfer metadata stream to it */ - int consumer_metadata_pipe[2]; + struct lttng_pipe *consumer_metadata_pipe; }; /* @@ -457,7 +460,7 @@ struct lttng_consumer_stream *consumer_allocate_stream(uint64_t channel_key, const char *channel_name, uid_t uid, gid_t gid, - int relayd_id, + uint64_t relayd_id, uint64_t session_id, int cpu, int *alloc_ret, @@ -468,7 +471,7 @@ struct lttng_consumer_channel *consumer_allocate_channel(uint64_t key, const char *name, uid_t uid, gid_t gid, - int relayd_id, + uint64_t relayd_id, enum lttng_event_output output, uint64_t tracefile_size, uint64_t tracefile_count); @@ -530,5 +533,6 @@ int consumer_send_status_channel(int sock, struct lttng_consumer_channel *channel); void notify_thread_del_channel(struct lttng_consumer_local_data *ctx, uint64_t key); +void consumer_destroy_relayd(struct consumer_relayd_sock_pair *relayd); #endif /* LIB_CONSUMER_H */