X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/79b7b95aed76eb742deef93d046886c20452fb36..aeab14d443572bdec6eef20def591d339e35df1e:/src/unix/threadpsx.cpp?ds=sidebyside diff --git a/src/unix/threadpsx.cpp b/src/unix/threadpsx.cpp index 0384805c1a..2274d96da2 100644 --- a/src/unix/threadpsx.cpp +++ b/src/unix/threadpsx.cpp @@ -67,6 +67,16 @@ #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(); }