Remove handle field from ring buffer context
[lttng-ust.git] / include / lttng / ringbuffer-context.h
index 614150da2668406c43ce7df2c348ca137fc071f7..b335d81a8ed167cc7c19b38c02d6e8e0bc60a940 100644 (file)
 #define _LTTNG_RING_BUFFER_CONTEXT_H
 
 #include <errno.h>
-#include <lttng/ust-tracer.h>
 #include <stdint.h>
 #include <stddef.h>
 #include <urcu/arch.h>
 #include <string.h>
-#include <lttng/align.h>
+
+#include <lttng/ust-tracer.h>
+#include <lttng/ust-align.h>
 #include <lttng/ust-compiler.h>
 
 struct lttng_ust_lib_ring_buffer;
@@ -44,15 +45,14 @@ struct lttng_ust_lib_ring_buffer_ctx {
        /* input received by lib_ring_buffer_reserve(), saved here. */
        struct lttng_ust_lib_ring_buffer_channel *chan; /* channel */
        void *priv;                     /* client private data */
-       struct lttng_ust_shm_handle *handle;    /* shared-memory handle */
        size_t data_size;               /* size of payload */
        int largest_align;              /*
                                         * alignment of the largest element
                                         * in the payload
                                         */
-       int cpu;                        /* processor id */
 
        /* output from lib_ring_buffer_reserve() */
+       int reserve_cpu;                /* processor id updated by the reserve */
        struct lttng_ust_lib_ring_buffer *buf;  /*
                                         * buffer corresponding to processor id
                                         * for this channel
@@ -80,27 +80,23 @@ struct lttng_ust_lib_ring_buffer_ctx {
  * @priv: client private data
  * @data_size: size of record data payload
  * @largest_align: largest alignment within data payload types
- * @cpu: processor id
  */
 static inline lttng_ust_notrace
 void lib_ring_buffer_ctx_init(struct lttng_ust_lib_ring_buffer_ctx *ctx,
                              struct lttng_ust_lib_ring_buffer_channel *chan,
-                             void *priv, size_t data_size, int largest_align,
-                             int cpu, struct lttng_ust_shm_handle *handle);
+                             void *priv, size_t data_size, int largest_align);
 static inline
 void lib_ring_buffer_ctx_init(struct lttng_ust_lib_ring_buffer_ctx *ctx,
                              struct lttng_ust_lib_ring_buffer_channel *chan,
-                             void *priv, size_t data_size, int largest_align,
-                             int cpu, struct lttng_ust_shm_handle *handle)
+                             void *priv, size_t data_size, int largest_align)
 {
        ctx->struct_size = sizeof(struct lttng_ust_lib_ring_buffer_ctx);
        ctx->chan = chan;
        ctx->priv = priv;
        ctx->data_size = data_size;
+       ctx->reserve_cpu = -1;
        ctx->largest_align = largest_align;
-       ctx->cpu = cpu;
        ctx->rflags = 0;
-       ctx->handle = handle;
        ctx->ip = 0;
 }
 
This page took 0.023929 seconds and 4 git commands to generate.