#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
// ctor & dtor
wxCRITSECT_INLINE wxCriticalSection();
wxCRITSECT_INLINE ~wxCriticalSection();
-
// enter the section (the same as locking a mutex)
wxCRITSECT_INLINE void Enter();
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() { }
#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
// ----------------------------------------------------------------------------