X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ea736fec49caf6e9fbacf59c7fecd93d73b767ce..cd5e9298159e58f57e05f3b76c9d4a45e1eefe12:/src/mac/thread.cpp diff --git a/src/mac/thread.cpp b/src/mac/thread.cpp index 69a6e85003..88f837d669 100644 --- a/src/mac/thread.cpp +++ b/src/mac/thread.cpp @@ -35,9 +35,7 @@ #include "wx/thread.h" #ifdef __WXMAC__ -#ifndef __DARWIN__ #include -#endif #include "wx/mac/uma.h" #endif @@ -207,7 +205,7 @@ wxMutexError wxMutex::Unlock() class wxConditionInternal { public: - wxConditionInternal() + wxConditionInternal(wxMutex& mutex) : m_mutex(mutex) { m_excessSignals = 0 ; } @@ -249,11 +247,12 @@ public: wxArrayLong m_waiters ; wxInt32 m_excessSignals ; + wxMutex& m_mutex; }; -wxCondition::wxCondition() +wxCondition::wxCondition(wxMutex& mutex) { - m_internal = new wxConditionInternal; + m_internal = new wxConditionInternal(mutex); } wxCondition::~wxCondition() @@ -266,10 +265,9 @@ void wxCondition::Wait() (void)m_internal->Wait(0xFFFFFFFFL); } -bool wxCondition::Wait(unsigned long sec, - unsigned long nsec) +bool wxCondition::Wait(unsigned long timeout_millis) { - return m_internal->Wait(sec*1000 + nsec/1000000); + return m_internal->Wait(timeout_millis); } void wxCondition::Signal()