-struct lttng_channel_ops {
- struct lttng_channel *(*channel_create)(const char *name,
- void *buf_addr,
- size_t subbuf_size, size_t num_subbuf,
- unsigned int switch_timer_interval,
- unsigned int read_timer_interval,
- unsigned char *uuid,
- uint32_t chan_id,
- const int *stream_fds, int nr_stream_fds,
- int64_t blocking_timeout);
- void (*channel_destroy)(struct lttng_channel *chan);
- int (*event_reserve)(struct lttng_ust_lib_ring_buffer_ctx *ctx,
- uint32_t event_id);
- void (*event_commit)(struct lttng_ust_lib_ring_buffer_ctx *ctx);
- void (*event_write)(struct lttng_ust_lib_ring_buffer_ctx *ctx,
- const void *src, size_t len);
- /*
- * packet_avail_size returns the available size in the current
- * packet. Note that the size returned is only a hint, since it
- * may change due to concurrent writes.
- */
- size_t (*packet_avail_size)(struct channel *chan,
- struct lttng_ust_shm_handle *handle);
- int (*is_finalized)(struct channel *chan);
- int (*is_disabled)(struct channel *chan);
- int (*flush_buffer)(struct channel *chan, struct lttng_ust_shm_handle *handle);
- void (*event_strcpy)(struct lttng_ust_lib_ring_buffer_ctx *ctx,
+struct lttng_ust_channel_buffer_ops {
+ uint32_t struct_size;
+
+ struct lttng_ust_channel_buffer_ops_private *priv; /* Private channel buffer ops interface */
+
+ int (*event_reserve)(struct lttng_ust_ring_buffer_ctx *ctx);
+ void (*event_commit)(struct lttng_ust_ring_buffer_ctx *ctx);
+ void (*event_write)(struct lttng_ust_ring_buffer_ctx *ctx,
+ const void *src, size_t len, size_t alignment);
+ void (*event_strcpy)(struct lttng_ust_ring_buffer_ctx *ctx,
+ const char *src, size_t len);
+ void (*event_pstrcpy_pad)(struct lttng_ust_ring_buffer_ctx *ctx,