]> git.saurik.com Git - wxWidgets.git/commitdiff
gcc is too aggressively hiding these inlines on wxCriticialSection on osx, expose...
authorStefan Csomor <csomor@advancedconcepts.ch>
Thu, 4 Sep 2008 06:26:24 +0000 (06:26 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Thu, 4 Sep 2008 06:26:24 +0000 (06:26 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/thread.h
src/unix/threadpsx.cpp

index 0ef9166f35729d3a5afafb25ec04b3f29db30883..4eed53d1bf99e4a026943f248839a858c53ec655 100644 (file)
@@ -207,7 +207,11 @@ private:
 #if !defined(__WXMSW__)
     #define wxCRITSECT_IS_MUTEX 1
 
+#ifdef __WXMAC__
+    #define wxCRITSECT_INLINE
+#else
     #define wxCRITSECT_INLINE inline
+#endif
 #else // MSW
     #define wxCRITSECT_IS_MUTEX 0
 
@@ -222,7 +226,6 @@ public:
     // ctor & dtor
     wxCRITSECT_INLINE wxCriticalSection();
     wxCRITSECT_INLINE ~wxCriticalSection();
-
     // enter the section (the same as locking a mutex)
     wxCRITSECT_INLINE void Enter();
 
@@ -261,7 +264,7 @@ private:
     DECLARE_NO_COPY_CLASS(wxCriticalSection)
 };
 
-#if wxCRITSECT_IS_MUTEX
+#if wxCRITSECT_IS_MUTEX && !defined(__WXMAC__)
     // implement wxCriticalSection using mutexes
     inline wxCriticalSection::wxCriticalSection() { }
     inline wxCriticalSection::~wxCriticalSection() { }
index 29288623cd431366f2dee4cc5ea766d872575e21..2274d96da22f8dc1aa4a5d0d4d35984e13bf019e 100644 (file)
     #define THR_ID(thr) ((long)(thr)->GetId())
 #endif
 
+#ifdef __WXMAC__
+
+    // implement wxCriticalSection using mutexes
+wxCriticalSection::wxCriticalSection() { }
+wxCriticalSection::~wxCriticalSection() { }
+
+void wxCriticalSection::Enter() { (void)m_mutex.Lock(); }
+void wxCriticalSection::Leave() { (void)m_mutex.Unlock(); }
+
+#endif
 // ----------------------------------------------------------------------------
 // constants
 // ----------------------------------------------------------------------------