summaryrefslogtreecommitdiff
path: root/lib/hash.h
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2019-02-11 11:38:57 +0100
committerRenato Westphal <renato@opensourcerouting.org>2019-02-11 15:49:49 -0200
commitc8a65463b20c00b3fd635eb4ca97f3b53927c0f9 (patch)
tree1e11fbf6b84f7a9ea2041e116dc634ac190c3f92 /lib/hash.h
parentbe566e4e45aed586716958a1c4adeb00cc352bc0 (diff)
lib: make atomic ops C++ compatible
C++ doesn't have ISO C11 stdatomic.h or "_Atomic inttype", so use std::atomic instead to get the headers compatible. Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/hash.h')
-rw-r--r--lib/hash.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/hash.h b/lib/hash.h
index 45ae6ce60a..aca2590a95 100644
--- a/lib/hash.h
+++ b/lib/hash.h
@@ -54,9 +54,9 @@ struct hash_backet {
struct hashstats {
/* number of empty hash buckets */
- _Atomic uint_fast32_t empty;
+ atomic_uint_fast32_t empty;
/* sum of squares of bucket length */
- _Atomic uint_fast32_t ssq;
+ atomic_uint_fast32_t ssq;
};
struct hash {