ongoing ABI implementation
[lttng-modules.git] / ltt-ring-buffer-client.h
index a262da105a6eec1dc9bfb6611d0fcc406cb4f2e0..c70c62b3c59c5dde47c59b93f325019c0ee7e835 100644 (file)
@@ -216,6 +216,26 @@ void ltt_channel_destroy(struct channel *chan)
        kfree(chan_priv);
 }
 
+static
+struct lib_ring_buffer *ltt_buffer_read_open(struct channel *chan)
+{
+       struct lib_ring_buffer *buf;
+       int cpu;
+
+       for_each_channel_cpu(cpu, chan->chan) {
+               buf = channel_get_ring_buffer(&config_config, chan, cpu);
+               if (!lib_ring_buffer_open_read(buf))
+                       return buf;
+       }
+       return NULL;
+}
+
+static
+struct lib_ring_buffer *ltt_buffer_read_close(struct lib_ring_buffer *buf)
+{
+       lib_ring_buffer_release_read(buf);
+}
+
 static void ltt_relay_remove_dirs(struct ltt_trace *trace)
 {
        debugfs_remove(trace->dentry.trace_root);
@@ -249,6 +269,8 @@ static struct ltt_transport ltt_relay_transport = {
                .remove_dirs = ltt_relay_remove_dirs,
                .create_channel = ltt_channel_create,
                .destroy_channel = ltt_channel_destroy,
+               .buffer_read_open = ltt_buffer_read_open,
+               .buffer_read_close = ltt_buffer_read_close,
        },
 };
 
This page took 0.024444 seconds and 4 git commands to generate.