Rename struct channel to struct lttng_kernel_ring_buffer_channel
[lttng-modules.git] / include / ringbuffer / frontend_internal.h
index 2624b4dc03683ff16a4eec4577488355398ecd93..fa186823a7db39304da918229e378de77eb5e05e 100644 (file)
@@ -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;
 }
@@ -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)
This page took 0.024597 seconds and 4 git commands to generate.