From 2ade0805e7be7fdad4fa77ee08e4b3c9c1044615 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sat, 18 Mar 2017 14:22:19 +0100 Subject: [PATCH] Fix issue with clang 4. --- m-i-shared.h | 2 +- m-shared.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/m-i-shared.h b/m-i-shared.h index c6c069bb..87eb2504 100644 --- a/m-i-shared.h +++ b/m-i-shared.h @@ -44,7 +44,7 @@ type: name of the type of the structure (aka. struct test_s) - not used currently. NOTE: There can be only one interface of this kind in a type! */ #define ISHARED_PTR_INTERFACE(name, type) \ - int M_C(name, _cpt) + atomic_int M_C(name, _cpt) /* Define the intrusive shared pointer type and its static inline functions. USAGE: ISHARED_PTR_DEF(name[, oplist]) */ diff --git a/m-shared.h b/m-shared.h index 841d1868..21ba777f 100644 --- a/m-shared.h +++ b/m-shared.h @@ -63,7 +63,7 @@ #define SHAREDI_PTR_DEF2(name, type, oplist) \ typedef struct M_C3(shared_, name, _s){ \ type *data; /* Pointer to the data */ \ - int cpt; /* Counter of how many points to the data */ \ + atomic_int cpt; /* Counter of how many points to the data */ \ bool combineAlloc; /* Does the data and the ptr share the slot? */ \ } *M_C3(shared_, name, _t)[1]; \ \