-#ifndef _LTTNG_RING_BUFFER_FRONTEND_API_H
-#define _LTTNG_RING_BUFFER_FRONTEND_API_H
-
/*
- * libringbuffer/frontend_api.h
+ * SPDX-License-Identifier: LGPL-2.1-only
*
* Copyright (C) 2005-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
- * 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
- *
- * Ring Buffer Library Synchronization Header (buffer write API).
- *
- * Author:
- * Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
* See ring_buffer_frontend.c for more information on wait-free
* algorithms.
* See frontend.h for channel allocation and read-side API.
*/
+#ifndef _LTTNG_RING_BUFFER_FRONTEND_API_H
+#define _LTTNG_RING_BUFFER_FRONTEND_API_H
+
#include <stddef.h>
-#include <urcu-bp.h>
#include <urcu/compiler.h>
#include "frontend.h"
unsigned long *o_begin, unsigned long *o_end,
unsigned long *o_old, size_t *before_hdr_pad)
{
- struct channel *chan = ctx->chan;
+ struct lttng_ust_lib_ring_buffer_channel *chan = ctx->chan;
struct lttng_ust_lib_ring_buffer *buf = ctx->buf;
*o_begin = v_read(config, &buf->offset);
*o_old = *o_begin;
struct lttng_ust_lib_ring_buffer_ctx *ctx,
void *client_ctx)
{
- struct channel *chan = ctx->chan;
+ struct lttng_ust_lib_ring_buffer_channel *chan = ctx->chan;
struct lttng_ust_shm_handle *handle = ctx->handle;
struct lttng_ust_lib_ring_buffer *buf;
unsigned long o_begin, o_end, o_old;
void lib_ring_buffer_commit(const struct lttng_ust_lib_ring_buffer_config *config,
const struct lttng_ust_lib_ring_buffer_ctx *ctx)
{
- struct channel *chan = ctx->chan;
+ struct lttng_ust_lib_ring_buffer_channel *chan = ctx->chan;
struct lttng_ust_shm_handle *handle = ctx->handle;
struct lttng_ust_lib_ring_buffer *buf = ctx->buf;
unsigned long offset_end = ctx->buf_offset;
static inline
void channel_record_disable(const struct lttng_ust_lib_ring_buffer_config *config,
- struct channel *chan)
+ struct lttng_ust_lib_ring_buffer_channel *chan)
{
uatomic_inc(&chan->record_disabled);
}
static inline
void channel_record_enable(const struct lttng_ust_lib_ring_buffer_config *config,
- struct channel *chan)
+ struct lttng_ust_lib_ring_buffer_channel *chan)
{
uatomic_dec(&chan->record_disabled);
}