*/
extern
-struct channel *channel_create(const struct lib_ring_buffer_config *config,
+struct lttng_kernel_ring_buffer_channel *channel_create(const struct lib_ring_buffer_config *config,
const char *name, void *priv,
void *buf_addr,
size_t subbuf_size, size_t num_subbuf,
* channel.
*/
extern
-void *channel_destroy(struct channel *chan);
+void *channel_destroy(struct lttng_kernel_ring_buffer_channel *chan);
/* Buffer read operations */
#define for_each_channel_cpu(cpu, chan) \
for ((cpu) = -1; \
({ (cpu) = cpumask_next(cpu, (chan)->backend.cpumask); \
- smp_read_barrier_depends(); (cpu) < nr_cpu_ids; });)
+ smp_rmb(); (cpu) < nr_cpu_ids; });)
extern struct lib_ring_buffer *channel_get_ring_buffer(
const struct lib_ring_buffer_config *config,
- struct channel *chan, int cpu);
+ struct lttng_kernel_ring_buffer_channel *chan, int cpu);
extern int lib_ring_buffer_open_read(struct lib_ring_buffer *buf);
extern void lib_ring_buffer_release_read(struct lib_ring_buffer *buf);
unsigned long consumed);
extern void lib_ring_buffer_put_subbuf(struct lib_ring_buffer *buf);
-void lib_ring_buffer_set_quiescent_channel(struct channel *chan);
-void lib_ring_buffer_clear_quiescent_channel(struct channel *chan);
+void lib_ring_buffer_set_quiescent_channel(struct lttng_kernel_ring_buffer_channel *chan);
+void lib_ring_buffer_clear_quiescent_channel(struct lttng_kernel_ring_buffer_channel *chan);
/*
* lib_ring_buffer_get_next_subbuf/lib_ring_buffer_put_next_subbuf are helpers
buf->backend.chan));
}
-extern void channel_reset(struct channel *chan);
+extern void channel_reset(struct lttng_kernel_ring_buffer_channel *chan);
extern void lib_ring_buffer_reset(struct lib_ring_buffer *buf);
static inline
int lib_ring_buffer_is_finalized(const struct lib_ring_buffer_config *config,
struct lib_ring_buffer *buf)
{
- int finalized = READ_ONCE(buf->finalized);
+ int finalized = LTTNG_READ_ONCE(buf->finalized);
/*
* Read finalized before counters.
*/
}
static inline
-int lib_ring_buffer_channel_is_finalized(const struct channel *chan)
+int lib_ring_buffer_channel_is_finalized(const struct lttng_kernel_ring_buffer_channel *chan)
{
return chan->finalized;
}
static inline
-int lib_ring_buffer_channel_is_disabled(const struct channel *chan)
+int lib_ring_buffer_channel_is_disabled(const struct lttng_kernel_ring_buffer_channel *chan)
{
return atomic_read(&chan->record_disabled);
}