diff options
author | Thomas Gschwantner <tharre3@gmail.com> | 2018-06-10 21:46:31 +0200 |
---|---|---|
committer | Thomas Gschwantner <tharre3@gmail.com> | 2018-06-22 14:52:22 +0200 |
commit | f8e674c87ed270810fe4927fd50f005336d4c52e (patch) | |
tree | 704b9659bf6356fd734ae4aa6e6d70a747302523 | |
parent | mpmc_ptr_ring: Switch to smp_[rw]mb() (diff) | |
download | wireguard-monolithic-historical-f8e674c87ed270810fe4927fd50f005336d4c52e.tar.xz wireguard-monolithic-historical-f8e674c87ed270810fe4927fd50f005336d4c52e.zip |
mpmc_ptr_ring: add include guard
-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 */ |