From Mathias Froehlich, "It appears not to be sufficient to set a cmake variable to get a define in

such a config file. Instead set that variable to 1. Also included a small compile fix, that appears to be required  than ..."
This commit is contained in:
Robert Osfield 2008-07-01 09:40:06 +00:00
parent bec0fc9c32
commit c6ba70e3ad
2 changed files with 3 additions and 1 deletions

View File

@ -91,5 +91,5 @@ int main(int, const char**)
" _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED)
IF(NOT _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS AND NOT _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS AND NOT _OPENTHREADS_ATOMIC_USE_SUN AND NOT _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED)
SET(_OPENTHREADS_ATOMIC_USE_MUTEX)
SET(_OPENTHREADS_ATOMIC_USE_MUTEX 1)
ENDIF(NOT _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS AND NOT _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS AND NOT _OPENTHREADS_ATOMIC_USE_SUN AND NOT _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED)

View File

@ -82,10 +82,12 @@ struct DeleteHandlerPointer
typedef std::set<Observer*> ObserverSet;
#if defined(_OSG_REFERENCED_USE_ATOMIC_OPERATIONS)
struct Referenced::ObserverSetData {
OpenThreads::Mutex _mutex;
ObserverSet _observers;
};
#endif
#if !defined(_OSG_REFERENCED_USE_ATOMIC_OPERATIONS)
static bool s_useThreadSafeReferenceCounting = getenv("OSG_THREAD_SAFE_REF_UNREF")!=0;