aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2018-06-11 23:29:09 +0200
committerThomas Gschwantner <tharre3@gmail.com>2018-06-22 14:52:53 +0200
commit914a109e9708eabc8ebc2fb5755f0ab074dea265 (patch)
tree32a7175755a5bf320ee2ed03a8794cdaf5bbc673 /src
parentmpmc_ptr_ring: Fix some style details (diff)
downloadwireguard-monolithic-historical-914a109e9708eabc8ebc2fb5755f0ab074dea265.tar.xz
wireguard-monolithic-historical-914a109e9708eabc8ebc2fb5755f0ab074dea265.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>
Diffstat (limited to 'src')
-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;