Fix: kconsumer: missing wait for metadata thread in do_sync_metadata
[lttng-tools.git] / src / common / ust-consumer / ust-consumer.h
index b5ff161864255a58278c3c8ecf1da1d223f0994c..575d7ff7d4cee3f271e79723e1644f4a00ed2a82 100644 (file)
@@ -22,6 +22,7 @@
 #include <errno.h>
 
 #include <common/consumer/consumer.h>
+#include <stdbool.h>
 
 #ifdef HAVE_LIBLTTNG_UST_CTL
 
@@ -49,9 +50,8 @@ int lttng_ustconsumer_on_recv_stream(struct lttng_consumer_stream *stream);
 
 void lttng_ustconsumer_on_stream_hangup(struct lttng_consumer_stream *stream);
 
-int lttng_ustctl_get_mmap_read_offset(struct lttng_consumer_stream *stream,
-               unsigned long *off);
-void *lttng_ustctl_get_mmap_base(struct lttng_consumer_stream *stream);
+void lttng_ustctl_flush_buffer(struct lttng_consumer_stream *stream,
+               int producer_active);
 int lttng_ustconsumer_get_stream_id(struct lttng_consumer_stream *stream,
                uint64_t *stream_id);
 int lttng_ustconsumer_data_pending(struct lttng_consumer_stream *stream);
@@ -63,7 +63,8 @@ int lttng_ustconsumer_recv_metadata(int sock, uint64_t key, uint64_t offset,
                struct lttng_consumer_channel *channel, int timer, int wait);
 int lttng_ustconsumer_request_metadata(struct lttng_consumer_local_data *ctx,
                struct lttng_consumer_channel *channel, int timer, int wait);
-int lttng_ustconsumer_sync_metadata(struct lttng_consumer_local_data *ctx,
+enum sync_metadata_status 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);
@@ -188,6 +189,11 @@ void *lttng_ustctl_get_mmap_base(struct lttng_consumer_stream *stream)
        return NULL;
 }
 static inline
+void lttng_ustctl_flush_buffer(struct lttng_consumer_stream *stream,
+               int producer_active)
+{
+}
+static inline
 void lttng_ustconsumer_close_all_metadata(struct lttng_ht *ht)
 {
 }
@@ -213,10 +219,10 @@ int lttng_ustconsumer_request_metadata(struct lttng_consumer_local_data *ctx,
        return -ENOSYS;
 }
 static inline
-int lttng_ustconsumer_sync_metadata(struct lttng_consumer_local_data *ctx,
+enum sync_metadata_status lttng_ustconsumer_sync_metadata(struct lttng_consumer_local_data *ctx,
                struct lttng_consumer_stream *metadata)
 {
-       return -ENOSYS;
+       return SYNC_METADATA_STATUS_ERROR;
 }
 static inline
 void lttng_ustconsumer_flush_buffer(struct lttng_consumer_stream *stream,
This page took 0.024692 seconds and 4 git commands to generate.