Fix: ACCESS_ONCE() removed in kernel 4.15
[lttng-modules.git] / lib / ringbuffer / frontend.h
index 6ff154528dd6e2b0d2c39e388a64193c0da7b135..1450cb7faf415d7e73f53b07101b534382474b53 100644 (file)
@@ -106,6 +106,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 +168,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.
         */
This page took 0.022887 seconds and 4 git commands to generate.