struct lttng_ust_lib_ring_buffer_ctx *ctx)
{
struct lttng_channel *lttng_chan = channel_get_private(chan);
- struct lttng_event *event = ctx->priv;
+ struct lttng_stack_ctx *lttng_ctx = ctx->priv2;
size_t orig_offset = offset;
size_t padding;
padding = 0;
WARN_ON_ONCE(1);
}
- offset += ctx_get_size(offset, event->ctx);
- offset += ctx_get_size(offset, lttng_chan->ctx);
+ offset += ctx_get_size(offset, lttng_ctx->chan_ctx);
+ offset += ctx_get_size(offset, lttng_ctx->event_ctx);
*pre_header_padding = padding;
return offset - orig_offset;
return 0;
}
+static int client_instance_id(struct lttng_ust_lib_ring_buffer *buf,
+ struct lttng_ust_shm_handle *handle,
+ uint64_t *id)
+{
+ struct packet_header *header;
+
+ header = client_packet_header(buf, handle);
+ *id = header->stream_instance_id;
+ return 0;
+}
+
static const
struct lttng_ust_client_lib_ring_buffer_client_cb client_cb = {
.parent = {
.stream_id = client_stream_id,
.current_timestamp = client_current_timestamp,
.sequence_number = client_sequence_number,
+ .instance_id = client_instance_id,
};
static const struct lttng_ust_lib_ring_buffer_config client_config = {