diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2019-02-11 11:38:57 +0100 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2019-02-11 15:49:49 -0200 |
| commit | c8a65463b20c00b3fd635eb4ca97f3b53927c0f9 (patch) | |
| tree | 1e11fbf6b84f7a9ea2041e116dc634ac190c3f92 /lib/memory.h | |
| parent | be566e4e45aed586716958a1c4adeb00cc352bc0 (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/memory.h')
| -rw-r--r-- | lib/memory.h | 10 |
1 files changed, 5 insertions, 5 deletions
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 }; |
