aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2018-07-01 05:28:38 +0200
committerJonathan Neuschäfer <j.neuschaefer@gmx.net>2018-07-01 05:36:05 +0200
commita9af379e9826289811627b596b48d69c842c1f50 (patch)
tree6c2194d39c90cc1052d406324e0cf46139c5663a
parentmpmc_ptr_ring: fix some style details (diff)
downloadwireguard-monolithic-historical-a9af379e9826289811627b596b48d69c842c1f50.tar.xz
wireguard-monolithic-historical-a9af379e9826289811627b596b48d69c842c1f50.zip
mpmc_ptr_ring: include all necessary headers
mpmc_ptr_ring.h should include the headers that it needs explicitly. This commit adds the following: - <asm/barrier.h>: smp_rmb, smp_wmb, smp_mb__before_atomic - <linux/atomic.h>: atomic_t, atomic_read, atomic_set, atomic_cmpxchg, atomic_inc - <linux/cache.h>: ____cacheline_aligned_in_smp - <linux/compiler.h>: READ_ONCE, WRITE_ONCE - <linux/errno.h>: ENOMEM - <linux/log2.h>: is_power_of_2 - <linux/processor.h>: cpu_relax - <linux/slab.h>: kcalloc, kfree - <linux/stddef.h>: NULL I'm not sure if all of them are really needed because I wasn't about to provoke a compile error due to the missing includes. Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
-rw-r--r--src/mpmc_ptr_ring.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mpmc_ptr_ring.h b/src/mpmc_ptr_ring.h
index cbcfca4..258a16f 100644
--- a/src/mpmc_ptr_ring.h
+++ b/src/mpmc_ptr_ring.h
@@ -38,6 +38,17 @@
* [1]: https://github.com/concurrencykit/ck/blob/master/include/ck_ring.h
*/
+#include <asm/barrier.h>
+#include <linux/atomic.h>
+#include <linux/cache.h>
+#include <linux/compiler.h>
+#include <linux/errno.h>
+#include <linux/log2.h>
+#include <linux/processor.h>
+#include <linux/slab.h>
+#include <linux/stddef.h>
+
+
struct mpmc_ptr_ring {
/* Read-mostly data */
void **queue;