X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/79b7b95aed76eb742deef93d046886c20452fb36..6da991dbf0b611c2fb5f337b334037f2641a896b:/src/unix/threadpsx.cpp diff --git a/src/unix/threadpsx.cpp b/src/unix/threadpsx.cpp index 0384805c1a..a133ba9fa0 100644 --- a/src/unix/threadpsx.cpp +++ b/src/unix/threadpsx.cpp @@ -67,6 +67,17 @@ #define THR_ID(thr) ((long)(thr)->GetId()) #endif +#ifdef __WXMAC__ + + // implement wxCriticalSection using mutexes +wxCriticalSection::wxCriticalSection( wxCriticalSectionType critSecType ) + : m_mutex( critSecType == wxCRITSEC_DEFAULT ? wxMUTEX_RECURSIVE : wxMUTEX_DEFAULT ) { } +wxCriticalSection::~wxCriticalSection() { } + +void wxCriticalSection::Enter() { (void)m_mutex.Lock(); } +void wxCriticalSection::Leave() { (void)m_mutex.Unlock(); } + +#endif // ---------------------------------------------------------------------------- // constants // ---------------------------------------------------------------------------- @@ -1050,11 +1061,6 @@ void wxThread::Yield() #endif } -void wxThread::Sleep(unsigned long milliseconds) -{ - wxMilliSleep(milliseconds); -} - int wxThread::GetCPUCount() { #if defined(_SC_NPROCESSORS_ONLN) @@ -1800,12 +1806,12 @@ static void DeleteThread(wxThread *This) } } -void wxMutexGuiEnter() +void wxMutexGuiEnterImpl() { gs_mutexGui->Lock(); } -void wxMutexGuiLeave() +void wxMutexGuiLeaveImpl() { gs_mutexGui->Unlock(); }