X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=include%2Fringbuffer%2Ffrontend_internal.h;h=fa186823a7db39304da918229e378de77eb5e05e;hb=860c213b645593fa19d7a3abf7ffdd1282f0a1c6;hp=680c65bb4f04e846d84150a093db35d45d6271bb;hpb=a071f25d89c4ef76ffe7bdfcaeb783bc9cfc1211;p=lttng-modules.git diff --git a/include/ringbuffer/frontend_internal.h b/include/ringbuffer/frontend_internal.h index 680c65bb..fa186823 100644 --- a/include/ringbuffer/frontend_internal.h +++ b/include/ringbuffer/frontend_internal.h @@ -21,7 +21,7 @@ /* buf_trunc mask selects only the buffer number. */ static inline -unsigned long buf_trunc(unsigned long offset, struct channel *chan) +unsigned long buf_trunc(unsigned long offset, struct lttng_kernel_ring_buffer_channel *chan) { return offset & ~(chan->backend.buf_size - 1); @@ -29,35 +29,35 @@ unsigned long buf_trunc(unsigned long offset, struct channel *chan) /* Select the buffer number value (counter). */ static inline -unsigned long buf_trunc_val(unsigned long offset, struct channel *chan) +unsigned long buf_trunc_val(unsigned long offset, struct lttng_kernel_ring_buffer_channel *chan) { return buf_trunc(offset, chan) >> chan->backend.buf_size_order; } /* buf_offset mask selects only the offset within the current buffer. */ static inline -unsigned long buf_offset(unsigned long offset, struct channel *chan) +unsigned long buf_offset(unsigned long offset, struct lttng_kernel_ring_buffer_channel *chan) { return offset & (chan->backend.buf_size - 1); } /* subbuf_offset mask selects the offset within the current subbuffer. */ static inline -unsigned long subbuf_offset(unsigned long offset, struct channel *chan) +unsigned long subbuf_offset(unsigned long offset, struct lttng_kernel_ring_buffer_channel *chan) { return offset & (chan->backend.subbuf_size - 1); } /* subbuf_trunc mask selects the subbuffer number. */ static inline -unsigned long subbuf_trunc(unsigned long offset, struct channel *chan) +unsigned long subbuf_trunc(unsigned long offset, struct lttng_kernel_ring_buffer_channel *chan) { return offset & ~(chan->backend.subbuf_size - 1); } /* subbuf_align aligns the offset to the next subbuffer. */ static inline -unsigned long subbuf_align(unsigned long offset, struct channel *chan) +unsigned long subbuf_align(unsigned long offset, struct lttng_kernel_ring_buffer_channel *chan) { return (offset + chan->backend.subbuf_size) & ~(chan->backend.subbuf_size - 1); @@ -65,7 +65,7 @@ unsigned long subbuf_align(unsigned long offset, struct channel *chan) /* subbuf_index returns the index of the current subbuffer within the buffer. */ static inline -unsigned long subbuf_index(unsigned long offset, struct channel *chan) +unsigned long subbuf_index(unsigned long offset, struct lttng_kernel_ring_buffer_channel *chan) { return buf_offset(offset, chan) >> chan->backend.subbuf_size_order; } @@ -134,7 +134,7 @@ int last_tsc_overflow(const struct lib_ring_buffer_config *config, #endif extern -int lib_ring_buffer_reserve_slow(struct lib_ring_buffer_ctx *ctx, +int lib_ring_buffer_reserve_slow(struct lttng_kernel_ring_buffer_ctx *ctx, void *client_ctx); extern @@ -144,7 +144,7 @@ void lib_ring_buffer_switch_slow(struct lib_ring_buffer *buf, extern void lib_ring_buffer_check_deliver_slow(const struct lib_ring_buffer_config *config, struct lib_ring_buffer *buf, - struct channel *chan, + struct lttng_kernel_ring_buffer_channel *chan, unsigned long offset, unsigned long commit_count, unsigned long idx, @@ -161,7 +161,7 @@ void lib_ring_buffer_clear(struct lib_ring_buffer *buf); static inline void lib_ring_buffer_reserve_push_reader(struct lib_ring_buffer *buf, - struct channel *chan, + struct lttng_kernel_ring_buffer_channel *chan, unsigned long offset) { unsigned long consumed_old, consumed_new; @@ -198,7 +198,7 @@ void lib_ring_buffer_reserve_push_reader(struct lib_ring_buffer *buf, */ static inline void lib_ring_buffer_clear_reader(struct lib_ring_buffer *buf, - struct channel *chan) + struct lttng_kernel_ring_buffer_channel *chan) { const struct lib_ring_buffer_config *config = &chan->backend.config; unsigned long offset, consumed_old, consumed_new; @@ -217,7 +217,7 @@ void lib_ring_buffer_clear_reader(struct lib_ring_buffer *buf, static inline int lib_ring_buffer_pending_data(const struct lib_ring_buffer_config *config, struct lib_ring_buffer *buf, - struct channel *chan) + struct lttng_kernel_ring_buffer_channel *chan) { return !!subbuf_offset(v_read(config, &buf->offset), chan); } @@ -238,7 +238,7 @@ unsigned long lib_ring_buffer_get_data_size(const struct lib_ring_buffer_config static inline int lib_ring_buffer_reserve_committed(const struct lib_ring_buffer_config *config, struct lib_ring_buffer *buf, - struct channel *chan) + struct lttng_kernel_ring_buffer_channel *chan) { unsigned long offset, idx, commit_count; @@ -273,7 +273,7 @@ int lib_ring_buffer_reserve_committed(const struct lib_ring_buffer_config *confi static inline void lib_ring_buffer_check_deliver(const struct lib_ring_buffer_config *config, struct lib_ring_buffer *buf, - struct channel *chan, + struct lttng_kernel_ring_buffer_channel *chan, unsigned long offset, unsigned long commit_count, unsigned long idx, @@ -300,7 +300,7 @@ void lib_ring_buffer_check_deliver(const struct lib_ring_buffer_config *config, static inline void lib_ring_buffer_write_commit_counter(const struct lib_ring_buffer_config *config, struct lib_ring_buffer *buf, - struct channel *chan, + struct lttng_kernel_ring_buffer_channel *chan, unsigned long buf_offset, unsigned long commit_count, struct commit_counters_hot *cc_hot)