]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/threadpsx.cpp
Enable graphics context by default
[wxWidgets.git] / src / unix / threadpsx.cpp
index 0384805c1ad09e9f98354e583ef09a43b0d2ba5f..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
 // ----------------------------------------------------------------------------
@@ -1050,11 +1060,6 @@ void wxThread::Yield()
 #endif
 }
 
-void wxThread::Sleep(unsigned long milliseconds)
-{
-    wxMilliSleep(milliseconds);
-}
-
 int wxThread::GetCPUCount()
 {
 #if defined(_SC_NPROCESSORS_ONLN)
@@ -1800,12 +1805,12 @@ static void DeleteThread(wxThread *This)
     }
 }
 
-void wxMutexGuiEnter()
+void wxMutexGuiEnterImpl()
 {
     gs_mutexGui->Lock();
 }
 
-void wxMutexGuiLeave()
+void wxMutexGuiLeaveImpl()
 {
     gs_mutexGui->Unlock();
 }