From: Jonathan Rajotte Date: Tue, 12 Feb 2019 15:57:41 +0000 (-0500) Subject: ust-consumer: Expose user space clear buffer operation X-Git-Tag: v2.12.0-rc1~154 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=214f70e02431aeebcf2d297c88f4add2e23ffe3f;p=lttng-tools.git ust-consumer: Expose user space clear buffer operation Signed-off-by: Jonathan Rajotte Change-Id: I25d15b41b7186242f43339d035650ffe9f3f9936 Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c index 41317fe65..b053df521 100644 --- a/src/common/ust-consumer/ust-consumer.c +++ b/src/common/ust-consumer/ust-consumer.c @@ -2290,6 +2290,14 @@ void lttng_ustconsumer_flush_buffer(struct lttng_consumer_stream *stream, ustctl_flush_buffer(stream->ustream, producer); } +void lttng_ustconsumer_clear_buffer(struct lttng_consumer_stream *stream) +{ + assert(stream); + assert(stream->ustream); + + ustctl_clear_buffer(stream->ustream); +} + int lttng_ustconsumer_get_current_timestamp( struct lttng_consumer_stream *stream, uint64_t *ts) { diff --git a/src/common/ust-consumer/ust-consumer.h b/src/common/ust-consumer/ust-consumer.h index d73b9852e..742506b4f 100644 --- a/src/common/ust-consumer/ust-consumer.h +++ b/src/common/ust-consumer/ust-consumer.h @@ -70,6 +70,7 @@ int lttng_ustconsumer_sync_metadata(struct lttng_consumer_local_data *ctx, struct lttng_consumer_stream *metadata); void lttng_ustconsumer_flush_buffer(struct lttng_consumer_stream *stream, int producer); +void lttng_ustconsumer_clear_buffer(struct lttng_consumer_stream *stream); int lttng_ustconsumer_get_current_timestamp( struct lttng_consumer_stream *stream, uint64_t *ts); int lttng_ustconsumer_get_sequence_number( @@ -232,6 +233,10 @@ void lttng_ustconsumer_flush_buffer(struct lttng_consumer_stream *stream, { } static inline +void lttng_ustconsumer_clear_buffer(struct lttng_consumer_stream *stream) +{ +} +static inline int lttng_ustconsumer_get_current_timestamp( struct lttng_consumer_stream *stream, uint64_t *ts) {