From: Mathias Froehlich Date: Sun, 23 Oct 2011 21:27:38 +0000 (+0200) Subject: Fix SGAtomic mutex logic. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7438aea8697802595dc5faf662606317b75f995c;p=simgear.git Fix SGAtomic mutex logic. --- diff --git a/simgear/structure/SGAtomic.cxx b/simgear/structure/SGAtomic.cxx index 68fcf775..71f24ed9 100644 --- a/simgear/structure/SGAtomic.cxx +++ b/simgear/structure/SGAtomic.cxx @@ -30,8 +30,10 @@ # include #elif defined(GCC_ATOMIC_BUILTINS_FOUND) #elif defined(__GNUC__) && defined(__i386__) -#else +#elif defined(SGATOMIC_USE_MUTEX) # include +#else +# error #endif unsigned diff --git a/simgear/structure/SGAtomic.hxx b/simgear/structure/SGAtomic.hxx index 91bb262e..493c8d25 100644 --- a/simgear/structure/SGAtomic.hxx +++ b/simgear/structure/SGAtomic.hxx @@ -35,6 +35,7 @@ #else // The sledge hammer ... # define SGATOMIC_USE_LIBRARY_FUNCTIONS +# define SGATOMIC_USE_MUTEX # include #endif @@ -109,9 +110,7 @@ private: SGAtomic(const SGAtomic&); SGAtomic& operator=(const SGAtomic&); -#if !defined(SGATOMIC_USE_GCC4_BUILTINS) \ - && !defined(SGATOMIC_USE_MIPOSPRO_BUILTINS) \ - && !defined(SGATOMIC_USE_WIN32_INTERLOCKED) +#if defined(SGATOMIC_USE_MUTEX) mutable SGMutex mMutex; #endif unsigned mValue;