Fix SGAtomic mutex logic.
This commit is contained in:
@@ -30,8 +30,10 @@
|
||||
# include <windows.h>
|
||||
#elif defined(GCC_ATOMIC_BUILTINS_FOUND)
|
||||
#elif defined(__GNUC__) && defined(__i386__)
|
||||
#else
|
||||
#elif defined(SGATOMIC_USE_MUTEX)
|
||||
# include <simgear/threads/SGGuard.hxx>
|
||||
#else
|
||||
# error
|
||||
#endif
|
||||
|
||||
unsigned
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#else
|
||||
// The sledge hammer ...
|
||||
# define SGATOMIC_USE_LIBRARY_FUNCTIONS
|
||||
# define SGATOMIC_USE_MUTEX
|
||||
# include <simgear/threads/SGThread.hxx>
|
||||
#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;
|
||||
|
||||
Reference in New Issue
Block a user