X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-ring-buffer-metadata-client.h;h=f3c4a67c8843ea0e9514ff994e04ed16ef979c08;hb=07b57e5eb9db5d4219cab7cb3ad61edbc32eb9e5;hp=8d725f2a8e1e7622a854a8a4867f031e99aaf55f;hpb=a9ff648cc4cc06d28b522d705c467d45ab916a9d;p=lttng-ust.git diff --git a/liblttng-ust/lttng-ring-buffer-metadata-client.h b/liblttng-ust/lttng-ring-buffer-metadata-client.h index 8d725f2a..f3c4a67c 100644 --- a/liblttng-ust/lttng-ring-buffer-metadata-client.h +++ b/liblttng-ust/lttng-ring-buffer-metadata-client.h @@ -52,7 +52,7 @@ static inline uint64_t lib_ring_buffer_clock_read(struct channel *chan) } static inline -unsigned char record_header_size(const struct lttng_ust_lib_ring_buffer_config *config, +size_t record_header_size(const struct lttng_ust_lib_ring_buffer_config *config, struct channel *chan, size_t offset, size_t *pre_header_padding, struct lttng_ust_lib_ring_buffer_ctx *ctx) @@ -101,6 +101,9 @@ static void client_buffer_begin(struct lttng_ust_lib_ring_buffer *buf, uint64_t handle); struct lttng_channel *lttng_chan = channel_get_private(chan); + assert(header); + if (!header) + return; header->magic = TSDL_MAGIC_NUMBER; memcpy(header->uuid, lttng_chan->uuid, sizeof(lttng_chan->uuid)); header->checksum = 0; /* 0 if unused */ @@ -129,6 +132,9 @@ static void client_buffer_end(struct lttng_ust_lib_ring_buffer *buf, uint64_t ts handle); unsigned long records_lost = 0; + assert(header); + if (!header) + return; header->content_size = data_size * CHAR_BIT; /* in bits */ header->packet_size = PAGE_ALIGN(data_size) * CHAR_BIT; /* in bits */ /* @@ -200,7 +206,7 @@ struct lttng_channel *_channel_create(const char *name, unsigned int read_timer_interval, unsigned char *uuid, uint32_t chan_id, - const char *shm_path) + const int *stream_fds, int nr_stream_fds) { struct lttng_channel chan_priv_init; struct lttng_ust_shm_handle *handle; @@ -216,7 +222,7 @@ struct lttng_channel *_channel_create(const char *name, &chan_priv_init, buf_addr, subbuf_size, num_subbuf, switch_timer_interval, read_timer_interval, - shm_path); + stream_fds, nr_stream_fds); if (!handle) return NULL; lttng_chan = priv;