X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-ring-buffer-client.h;h=dc3356e4d286f2c2d190d9816d4ab34f2eb65b84;hb=3aed4dca825a63757a3c95b9d41019660f83e02d;hp=8b87db0d4ca47e3d7e0b696db0002efb30b59a34;hpb=1804b6153d4cba1bc1152b58497e981a1140caa9;p=lttng-modules.git diff --git a/lttng-ring-buffer-client.h b/lttng-ring-buffer-client.h index 8b87db0d..dc3356e4 100644 --- a/lttng-ring-buffer-client.h +++ b/lttng-ring-buffer-client.h @@ -1,23 +1,10 @@ -/* +/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1) + * * lttng-ring-buffer-client.h * * LTTng lib ring buffer client template. * * Copyright (C) 2010-2012 Mathieu Desnoyers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; only - * version 2.1 of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include @@ -636,15 +623,15 @@ int lttng_event_reserve(struct lib_ring_buffer_ctx *ctx, struct lttng_client_ctx client_ctx; int ret, cpu; - /* Compute internal size of context structures. */ - ctx_get_struct_size(lttng_chan->ctx, &client_ctx.packet_context_len, lttng_chan, ctx); - ctx_get_struct_size(event->ctx, &client_ctx.event_context_len, lttng_chan, ctx); - cpu = lib_ring_buffer_get_cpu(&client_config); if (unlikely(cpu < 0)) return -EPERM; ctx->cpu = cpu; + /* Compute internal size of context structures. */ + ctx_get_struct_size(lttng_chan->ctx, &client_ctx.packet_context_len, lttng_chan, ctx); + ctx_get_struct_size(event->ctx, &client_ctx.event_context_len, lttng_chan, ctx); + switch (lttng_chan->header_type) { case 1: /* compact */ if (event_id > 30) @@ -794,6 +781,10 @@ static void __exit lttng_ring_buffer_client_exit(void) module_exit(lttng_ring_buffer_client_exit); MODULE_LICENSE("GPL and additional rights"); -MODULE_AUTHOR("Mathieu Desnoyers"); +MODULE_AUTHOR("Mathieu Desnoyers "); MODULE_DESCRIPTION("LTTng ring buffer " RING_BUFFER_MODE_TEMPLATE_STRING " client"); +MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "." + __stringify(LTTNG_MODULES_MINOR_VERSION) "." + __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION) + LTTNG_MODULES_EXTRAVERSION);