Refactoring: struct lttng_channel_ops
[lttng-ust.git] / liblttng-ust / lttng-ring-buffer-metadata-client.h
index 305c8655806a089870467506446f1b95469a28a2..bb5c5dfe8abb2d1160ec0c256d7b98ff8ae4e6d9 100644 (file)
@@ -235,12 +235,9 @@ int lttng_event_reserve(struct lttng_ust_lib_ring_buffer_ctx *ctx, uint32_t even
        ret = lib_ring_buffer_reserve(&client_config, ctx, NULL);
        if (ret)
                return ret;
-       if (caa_likely(ctx->ctx_len
-                       >= sizeof(struct lttng_ust_lib_ring_buffer_ctx))) {
-               if (lib_ring_buffer_backend_get_pages(&client_config, ctx,
-                               &ctx->backend_pages))
-                       return -EPERM;
-       }
+       if (lib_ring_buffer_backend_get_pages(&client_config, ctx,
+                       &ctx->backend_pages))
+               return -EPERM;
        return 0;
 }
 
@@ -317,14 +314,14 @@ int lttng_flush_buffer(struct channel *chan, struct lttng_ust_shm_handle *handle
 static struct lttng_transport lttng_relay_transport = {
        .name = "relay-" RING_BUFFER_MODE_TEMPLATE_STRING "-mmap",
        .ops = {
+               .struct_size = sizeof(struct lttng_ust_channel_ops),
+
                .channel_create = _channel_create,
                .channel_destroy = lttng_channel_destroy,
                .event_reserve = lttng_event_reserve,
                .event_commit = lttng_event_commit,
                .event_write = lttng_event_write,
                .packet_avail_size = lttng_packet_avail_size,
-               //.get_reader_wait_queue = lttng_get_reader_wait_queue,
-               //.get_hp_wait_queue = lttng_get_hp_wait_queue,
                .is_finalized = lttng_is_finalized,
                .is_disabled = lttng_is_disabled,
                .flush_buffer = lttng_flush_buffer,
This page took 0.022841 seconds and 4 git commands to generate.