Drop 'linux/atomic.h' wrapper
authorMichael Jeanson <mjeanson@efficios.com>
Fri, 18 Nov 2022 16:42:33 +0000 (11:42 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 23 Nov 2022 20:02:37 +0000 (15:02 -0500)
Change-Id: Ia4341ded38739dbdd7db5fcd4b5bc192b2150c11
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/wrapper/atomic.h [deleted file]
src/lib/ringbuffer/ring_buffer_frontend.c

diff --git a/include/wrapper/atomic.h b/include/wrapper/atomic.h
deleted file mode 100644 (file)
index 31bf328..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/* SPDX-License-Identifier: (GPL-2.0-only OR LGPL-2.1-only)
- *
- * wrapper/atomic.h
- *
- * wrapper around linux/atomic.h.
- *
- * Copyright (C) 2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- */
-
-#ifndef _LTTNG_WRAPPER_ATOMIC_H
-#define _LTTNG_WRAPPER_ATOMIC_H
-
-#include <lttng/kernel-version.h>
-#include <linux/atomic.h>
-
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,16,0))
-static inline void lttng_smp_mb__before_atomic(void)
-{
-       smp_mb__before_atomic();
-}
-
-static inline void lttng_smp_mb__after_atomic(void)
-{
-       smp_mb__after_atomic();
-}
-#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,16,0)) */
-static inline void lttng_smp_mb__before_atomic(void)
-{
-       smp_mb__before_atomic_inc();
-}
-
-static inline void lttng_smp_mb__after_atomic(void)
-{
-       smp_mb__after_atomic_inc();
-}
-#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,16,0)) */
-
-#endif /* _LTTNG_WRAPPER_ATOMIC_H */
index 8a69e9ab57eec661de51040b4552daaa56b67dcf..e12c70263ea1942b03509dd27320a87f18a3312d 100644 (file)
@@ -37,6 +37,7 @@
  *   - put_subbuf
  */
 
+#include <linux/atomic.h>
 #include <linux/delay.h>
 #include <linux/module.h>
 #include <linux/percpu.h>
@@ -47,7 +48,6 @@
 #include <ringbuffer/frontend.h>
 #include <ringbuffer/iterator.h>
 #include <ringbuffer/nohz.h>
-#include <wrapper/atomic.h>
 #include <wrapper/cpu.h>
 #include <wrapper/kref.h>
 #include <wrapper/percpu-defs.h>
@@ -1047,7 +1047,7 @@ int lib_ring_buffer_open_read(struct lttng_kernel_ring_buffer *buf)
                atomic_long_dec(&buf->active_readers);
                return -EOVERFLOW;
        }
-       lttng_smp_mb__after_atomic();
+       smp_mb__after_atomic();
        return 0;
 }
 EXPORT_SYMBOL_GPL(lib_ring_buffer_open_read);
@@ -1057,7 +1057,7 @@ void lib_ring_buffer_release_read(struct lttng_kernel_ring_buffer *buf)
        struct lttng_kernel_ring_buffer_channel *chan = buf->backend.chan;
 
        CHAN_WARN_ON(chan, atomic_long_read(&buf->active_readers) != 1);
-       lttng_smp_mb__before_atomic();
+       smp_mb__before_atomic();
        atomic_long_dec(&buf->active_readers);
        kref_put(&chan->ref, channel_release);
 }
This page took 0.028927 seconds and 4 git commands to generate.