#include <unistd.h>
#include <urcu/compiler.h>
-#include <lttng/ringbuffer-config.h>
+#include <lttng/ringbuffer-context.h>
+#include "ringbuffer-config.h"
#include "backend_types.h"
#include "frontend_types.h"
#include "shm.h"
__attribute__((visibility("hidden")))
int lib_ring_buffer_backend_create(struct lttng_ust_lib_ring_buffer_backend *bufb,
- struct channel_backend *chan, int cpu,
+ struct channel_backend *chan,
+ int cpu,
struct lttng_ust_shm_handle *handle,
struct shm_object *shmobj);
{
struct lttng_ust_lib_ring_buffer_backend *bufb = &ctx->buf->backend;
struct channel_backend *chanb = &ctx->chan->backend;
- struct lttng_ust_shm_handle *handle = ctx->handle;
+ struct lttng_ust_shm_handle *handle = ctx->chan->handle;
size_t sbidx;
size_t offset = ctx->buf_offset;
struct lttng_ust_lib_ring_buffer_backend_subbuffer *wsb;
struct lttng_ust_shm_handle *handle)
{
unsigned long sb_bindex;
- struct channel *chan;
+ struct lttng_ust_lib_ring_buffer_channel *chan;
struct lttng_ust_lib_ring_buffer_backend_pages_shmp *pages_shmp;
struct lttng_ust_lib_ring_buffer_backend_pages *backend_pages;
struct lttng_ust_shm_handle *handle)
{
struct lttng_ust_lib_ring_buffer_backend_subbuffer *wsb;
- struct channel *chan;
+ struct lttng_ust_lib_ring_buffer_channel *chan;
if (config->mode != RING_BUFFER_OVERWRITE)
return;
return -EPERM;
if (config->mode == RING_BUFFER_OVERWRITE) {
- struct channel *chan;
+ struct lttng_ust_lib_ring_buffer_channel *chan;
/*
* Exchange the target writer subbuffer with our own unused
* write len bytes to dest with c
*/
static inline
-void lib_ring_buffer_do_memset(char *dest, int c, unsigned long len)
+void lib_ring_buffer_do_memset(char *dest, char c, unsigned long len)
{
unsigned long i;