diff options
author | Thomas Gschwantner <tharre3@gmail.com> | 2018-07-01 05:28:37 +0200 |
---|---|---|
committer | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | 2018-07-01 05:34:45 +0200 |
commit | 5796a9a0ad8745172dc632eb79f339570f85a62a (patch) | |
tree | f1cf31e97e2648963069d8ad4834f7482e56388a /src/mpmc_ptr_ring.h | |
parent | mpmc_ptr_ring: switch to smp_[rw]mb() (diff) | |
download | wireguard-monolithic-historical-5796a9a0ad8745172dc632eb79f339570f85a62a.tar.xz wireguard-monolithic-historical-5796a9a0ad8745172dc632eb79f339570f85a62a.zip |
mpmc_ptr_ring: add include guard
Diffstat (limited to 'src/mpmc_ptr_ring.h')
-rw-r--r-- | src/mpmc_ptr_ring.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mpmc_ptr_ring.h b/src/mpmc_ptr_ring.h index 3a59bf1..f437ae3 100644 --- a/src/mpmc_ptr_ring.h +++ b/src/mpmc_ptr_ring.h @@ -1,8 +1,12 @@ /* SPDX-License-Identifier: GPL-2.0 * * Copyright (C) 2018 Jonathan Neuschäfer + * Copyright (C) 2018 Thomas Gschwantner <tharre3@gmail.com>. All Rights Reserved. */ +#ifndef MPMC_RING_PTR_H +#define MPMC_RING_PTR_H + /* * This is an implementation of a Multi-Producer/Multi-Consumer (MPMC) queue, * strongly inspired by ConcurrencyKit[1], and Linux's own ptr_ring.h. @@ -207,3 +211,5 @@ static inline void __mpmc_ptr_ring_discard_one(struct mpmc_ptr_ring *r) smp_mb__before_atomic(); atomic_inc(&r->consumer_head); } + +#endif /* MPMC_RING_PTR_H */ |