X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=libringbuffer%2Fring_buffer_backend.c;h=ac45446b8a4ea09525e63fc128b8a9d58039a8be;hb=5f6daaef86c3b4cff5af523cbbd8f2630634259d;hp=412180bdfc8c16ab2252410ec12971cee7a075f6;hpb=b72687b85f4f07a9b63be329ad1fe95b36d24900;p=lttng-ust.git diff --git a/libringbuffer/ring_buffer_backend.c b/libringbuffer/ring_buffer_backend.c index 412180bd..ac45446b 100644 --- a/libringbuffer/ring_buffer_backend.c +++ b/libringbuffer/ring_buffer_backend.c @@ -1,21 +1,7 @@ /* - * ring_buffer_backend.c + * SPDX-License-Identifier: LGPL-2.1-only * * Copyright (C) 2005-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 */ #define _LGPL_SOURCE @@ -25,13 +11,16 @@ #include #include -#include -#include +#include +#include + +#include "ringbuffer-config.h" #include "vatomic.h" #include "backend.h" #include "frontend.h" #include "smp.h" #include "shm.h" +#include "ust-compat.h" /** * lib_ring_buffer_backend_allocate - allocate a channel buffer @@ -236,7 +225,8 @@ void lib_ring_buffer_backend_reset(struct lttng_ust_lib_ring_buffer_backend *buf */ void channel_backend_reset(struct channel_backend *chanb) { - struct channel *chan = caa_container_of(chanb, struct channel, backend); + struct lttng_ust_lib_ring_buffer_channel *chan = caa_container_of(chanb, + struct lttng_ust_lib_ring_buffer_channel, backend); const struct lttng_ust_lib_ring_buffer_config *config = &chanb->config; /* @@ -273,7 +263,8 @@ int channel_backend_init(struct channel_backend *chanb, struct lttng_ust_shm_handle *handle, const int *stream_fds) { - struct channel *chan = caa_container_of(chanb, struct channel, backend); + struct lttng_ust_lib_ring_buffer_channel *chan = caa_container_of(chanb, + struct lttng_ust_lib_ring_buffer_channel, backend); unsigned int i; int ret; size_t shmsize = 0, num_subbuf_alloc;