ust-consumer: Expose user space clear buffer operation
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 12 Feb 2019 15:57:41 +0000 (10:57 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 19 Dec 2019 22:19:51 +0000 (17:19 -0500)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Change-Id: I25d15b41b7186242f43339d035650ffe9f3f9936
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/ust-consumer/ust-consumer.c
src/common/ust-consumer/ust-consumer.h

index 41317fe657d57cd4d5b5873c03fc2e3e77793118..b053df521d0f3a9b46cb7b17d6ed92257fb9bd41 100644 (file)
@@ -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)
 {
index d73b9852e7d0cbfe21551dbf63f06580fe0e58c2..742506b4fbdb9aa80bbc47745cd8efc5d0a6e194 100644 (file)
@@ -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)
 {
This page took 0.036051 seconds and 4 git commands to generate.