diff options
author | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | 2018-06-11 23:29:09 +0200 |
---|---|---|
committer | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | 2018-06-12 16:04:44 +0200 |
commit | 88072c37d640e88b01e5ec967e89022d90075d14 (patch) | |
tree | 0f8b688c0e1bc297546c011848bacc581b70703d /src/mpmc_ptr_ring.h | |
parent | mpmc_ptr_ring: Fix some style details (diff) | |
download | wireguard-monolithic-historical-88072c37d640e88b01e5ec967e89022d90075d14.tar.xz wireguard-monolithic-historical-88072c37d640e88b01e5ec967e89022d90075d14.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 '')
-rw-r--r-- | src/mpmc_ptr_ring.h | 11 |
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; |