Ust consumer: Expose userspace clear buffer operation
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 12 Feb 2019 15:57:41 +0000 (10:57 -0500)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Mon, 18 Feb 2019 19:25:02 +0000 (14:25 -0500)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
src/common/ust-consumer/ust-consumer.c
src/common/ust-consumer/ust-consumer.h

index 7cd41cbd75cbbd2b3d60be5659be325ddc8773fc..8916daefa1a1b3f93769a46082c2c8cf5b8682f2 100644 (file)
@@ -2255,6 +2255,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 7cd114b60c885b6c709e40341743a0cb55ccc4fa..6b850d8c1c85779eee5e82eaad1d5f749b0bde65 100644 (file)
@@ -68,6 +68,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(
@@ -225,6 +226,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.036764 seconds and 5 git commands to generate.