]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/atomic.h
Somehow, setting a tint color makes gauge work :/.
[wxWidgets.git] / include / wx / atomic.h
index 829e29bdd34fff719534cad151c8bdec736eb3de..1439d29484d78ecd86a6434f4569b7f9e8b4afe2 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     functions to manipulate atomically integers and pointers
 // Author:      Armel Asselin
 // Created:     12/13/2006
-// RCS-ID:      $Id$
 // Copyright:   (c) Armel Asselin
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -43,7 +42,7 @@ inline wxUint32 wxAtomicDec (wxUint32 &value)
 }
 
 
-#elif defined(__WXMSW__)
+#elif defined(__WINDOWS__)
 
 // include standard Windows headers
 #include "wx/msw/wrapwin.h"
@@ -88,7 +87,7 @@ inline wxUint32 wxAtomicDec (wxUint32 &value)
 #else // unknown platform
 
 // it will result in inclusion if the generic implementation code a bit later in this page
-#define wxHAS_GENERIC_ATOMIC_OPS 1
+#define wxNEEDS_GENERIC_ATOMIC_OPS
 
 #endif // unknown platform
 
@@ -105,11 +104,8 @@ inline wxUint32 wxAtomicDec (wxUint32 &value) { return --value; }
 //  behaviour
 // ----------------------------------------------------------------------------
 
-#if !defined(wxHAS_GENERIC_ATOMIC_OPS)
-#define wxHAS_GENERIC_ATOMIC_OPS 0
-#endif
+#ifdef wxNEEDS_GENERIC_ATOMIC_OPS
 
-#if wxHAS_GENERIC_ATOMIC_OPS
 #include "wx/thread.h" // for wxCriticalSection
 
 class wxAtomicInt32
@@ -144,14 +140,16 @@ private:
 inline void wxAtomicInc(wxAtomicInt32 &value) { value.Inc(); }
 inline wxInt32 wxAtomicDec(wxAtomicInt32 &value) { return value.Dec(); }
 
-#else // !wxHAS_GENERIC_ATOMIC_OPS
+#else // !wxNEEDS_GENERIC_ATOMIC_OPS
+
+#define wxHAS_ATOMIC_OPS
 
 inline void wxAtomicInc(wxInt32 &value) { wxAtomicInc((wxUint32&)value); }
 inline wxInt32 wxAtomicDec(wxInt32 &value) { return wxAtomicDec((wxUint32&)value); }
 
 typedef wxInt32 wxAtomicInt32;
 
-#endif // wxHAS_GENERIC_ATOMIC_OPS
+#endif // wxNEEDS_GENERIC_ATOMIC_OPS
 
 // all the native implementations use 32 bits currently
 // for a 64 bits implementation we could use (a future) wxAtomicInt64 as