From c8a65463b20c00b3fd635eb4ca97f3b53927c0f9 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Mon, 11 Feb 2019 11:38:57 +0100 Subject: 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 --- lib/memory.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/memory.h') diff --git a/lib/memory.h b/lib/memory.h index 1a0269f8bb..40b9d36ee6 100644 --- a/lib/memory.h +++ b/lib/memory.h @@ -33,12 +33,12 @@ struct memtype { struct memtype *next, **ref; const char *name; - _Atomic size_t n_alloc; - _Atomic size_t n_max; - _Atomic size_t size; + atomic_size_t n_alloc; + atomic_size_t n_max; + atomic_size_t size; #ifdef HAVE_MALLOC_USABLE_SIZE - _Atomic size_t total; - _Atomic size_t max_size; + atomic_size_t total; + atomic_size_t max_size; #endif }; -- cgit v1.2.3