diff options
author | Thomas Gschwantner <tharre3@gmail.com> | 2018-06-10 21:46:31 +0200 |
---|---|---|
committer | Thomas Gschwantner <tharre3@gmail.com> | 2018-06-10 22:24:42 +0200 |
commit | bd9b054d0889053c0cd8c7af330aaeca42db54f0 (patch) | |
tree | 39b67eb14af89b83a4137518d66ef04ddcac807b | |
parent | mpmc_ptr_ring: Switch to smp_[rw]mb() (diff) | |
download | wireguard-monolithic-historical-bd9b054d0889053c0cd8c7af330aaeca42db54f0.tar.xz wireguard-monolithic-historical-bd9b054d0889053c0cd8c7af330aaeca42db54f0.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 */ |