-#ifndef _LIB_RING_BUFFER_CONFIG_H
-#define _LIB_RING_BUFFER_CONFIG_H
-
-/*
+/* SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1)
+ *
* lib/ringbuffer/config.h
*
* Ring buffer configuration header. Note: after declaring the standard inline
* functions, clients should also include linux/ringbuffer/api.h.
*
* Copyright (C) 2010-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
*/
+#ifndef _LIB_RING_BUFFER_CONFIG_H
+#define _LIB_RING_BUFFER_CONFIG_H
+
#include <linux/types.h>
#include <linux/percpu.h>
-#include "../align.h"
-#include "../../lttng-tracer-core.h"
+#include <lib/align.h>
+#include <lttng-tracer-core.h>
struct lib_ring_buffer;
struct channel;
size_t (*record_header_size) (const struct lib_ring_buffer_config *config,
struct channel *chan, size_t offset,
size_t *pre_header_padding,
- struct lib_ring_buffer_ctx *ctx);
+ struct lib_ring_buffer_ctx *ctx,
+ void *client_ctx);
/* Slow path only, at subbuffer switch */
size_t (*subbuffer_header_size) (void);
*
* wakeup:
*
- * RING_BUFFER_WAKEUP_BY_TIMER uses per-cpu deferrable timers to poll the
+ * RING_BUFFER_WAKEUP_BY_TIMER uses per-cpu timers to poll the
* buffers and wake up readers if data is ready. Mainly useful for tracers which
* don't want to call into the wakeup code on the tracing path. Use in
* combination with "read_timer_interval" channel_create() argument.
*/
u64 tsc; /* time-stamp counter value */
unsigned int rflags; /* reservation flags */
+ /* Cache backend pages pointer chasing. */
+ struct lib_ring_buffer_backend_pages *backend_pages;
};
/**
ctx->largest_align = largest_align;
ctx->cpu = cpu;
ctx->rflags = 0;
+ ctx->backend_pages = NULL;
}
/*
return 0;
}
-#include "../../wrapper/ringbuffer/vatomic.h"
+#include <wrapper/ringbuffer/vatomic.h>
#endif /* _LIB_RING_BUFFER_CONFIG_H */