X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fconsumer%2Fconsumer-stream.h;h=b6be533997c471ba83dbfd87502286cdbd99ed95;hb=6f1177cf8de79015ed38f48749029c81240b0eb6;hp=44a5b0fc1efa42505c03af8054b12212c86687e6;hpb=84a93c0895b299b5bbca122a0cf399b12b8a8e63;p=lttng-tools.git diff --git a/src/common/consumer/consumer-stream.h b/src/common/consumer/consumer-stream.h index 44a5b0fc1..b6be53399 100644 --- a/src/common/consumer/consumer-stream.h +++ b/src/common/consumer/consumer-stream.h @@ -20,6 +20,24 @@ #include "consumer.h" +/* + * Create a consumer stream. + * + * The channel lock MUST be acquired. + */ +struct lttng_consumer_stream *consumer_stream_create( + struct lttng_consumer_channel *channel, + uint64_t channel_key, + uint64_t stream_key, + const char *channel_name, + uint64_t relayd_id, + uint64_t session_id, + struct lttng_trace_chunk *trace_chunk, + int cpu, + int *alloc_ret, + enum consumer_channel_type type, + unsigned int monitor); + /* * Close stream's file descriptors and, if needed, close stream also on the * relayd side. @@ -94,4 +112,13 @@ int consumer_stream_create_output_files(struct lttng_consumer_stream *stream, */ int consumer_stream_rotate_output_files(struct lttng_consumer_stream *stream); +/* + * Indicates whether or not a stream is logically deleted. A deleted stream + * should no longer be used; its existence is only garanteed by the RCU lock + * held by the caller. + * + * This function must be called with the RCU read side lock held. + */ +bool consumer_stream_is_deleted(struct lttng_consumer_stream *stream); + #endif /* LTTNG_CONSUMER_STREAM_H */