X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=lib%2Fringbuffer%2Ffrontend.h;h=ba96d9a6a215e09f4975e56e45500629dab48e1e;hb=a2b0231a9ae996cc69e48d75c338ad7d081a0f85;hp=6ff154528dd6e2b0d2c39e388a64193c0da7b135;hpb=64af2437213d40fdb1f386ffcad2c83ed5c11185;p=lttng-modules.git diff --git a/lib/ringbuffer/frontend.h b/lib/ringbuffer/frontend.h index 6ff15452..ba96d9a6 100644 --- a/lib/ringbuffer/frontend.h +++ b/lib/ringbuffer/frontend.h @@ -51,6 +51,9 @@ /* Internal helpers */ #include +/* Max ring buffer nesting count, see lib_ring_buffer_get_cpu(). */ +#define RING_BUFFER_MAX_NESTING 4 + /* Buffer creation/removal and setup operations */ /* @@ -106,6 +109,10 @@ extern void lib_ring_buffer_release_read(struct lib_ring_buffer *buf); extern int lib_ring_buffer_snapshot(struct lib_ring_buffer *buf, unsigned long *consumed, unsigned long *produced); +extern int lib_ring_buffer_snapshot_sample_positions( + struct lib_ring_buffer *buf, + unsigned long *consumed, + unsigned long *produced); extern void lib_ring_buffer_move_consumer(struct lib_ring_buffer *buf, unsigned long consumed_new); @@ -164,7 +171,7 @@ static inline int lib_ring_buffer_is_finalized(const struct lib_ring_buffer_config *config, struct lib_ring_buffer *buf) { - int finalized = ACCESS_ONCE(buf->finalized); + int finalized = READ_ONCE(buf->finalized); /* * Read finalized before counters. */