X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=liblttng-ust%2Flttng-ring-buffer-metadata-client.h;h=bb5c5dfe8abb2d1160ec0c256d7b98ff8ae4e6d9;hb=49926dbd13cfcb46f6947b7e99bc2999c06dc743;hp=fbb138714060b87cfd39ebd4467435402d7cb70e;hpb=c0c0989ab70574e09b2f7e8b48c2da6af664a849;p=lttng-ust.git diff --git a/liblttng-ust/lttng-ring-buffer-metadata-client.h b/liblttng-ust/lttng-ring-buffer-metadata-client.h index fbb13871..bb5c5dfe 100644 --- a/liblttng-ust/lttng-ring-buffer-metadata-client.h +++ b/liblttng-ust/lttng-ring-buffer-metadata-client.h @@ -8,8 +8,10 @@ #include #include -#include -#include "lttng/bitfield.h" + +#include +#include "ust-bitfield.h" +#include "ust-compat.h" #include "lttng-tracer.h" #include "../libringbuffer/frontend_types.h" @@ -185,8 +187,6 @@ static const struct lttng_ust_lib_ring_buffer_config client_config = { .cb_ptr = &client_cb.parent, }; -const struct lttng_ust_client_lib_ring_buffer_client_cb *LTTNG_CLIENT_CALLBACKS = &client_cb; - static struct lttng_channel *_channel_create(const char *name, void *buf_addr, @@ -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,