+// ----------------------------------------------------------------------------
+// wxCondition implementation
+// ----------------------------------------------------------------------------
+
+// TODO this is not yet completed
+
+class wxConditionInternal
+{
+public:
+ wxConditionInternal(wxMutex& mutex) : m_mutex(mutex)
+ {
+ m_excessSignals = 0 ;
+ }
+ ~wxConditionInternal()
+ {
+ }
+
+ bool IsOk() const { return m_mutex.IsOk() ; }
+
+ wxCondError Wait()
+ {
+ return WaitTimeout(0xFFFFFFFF );
+ }
+
+ wxCondError WaitTimeout(unsigned long msectimeout)
+ {
+ wxMacStCritical critical ;
+ if ( m_excessSignals > 0 )
+ {
+ --m_excessSignals ;
+ return wxCOND_NO_ERROR ;
+ }
+ else if ( msectimeout == 0 )
+ {
+ return wxCOND_MISC_ERROR ;
+ }
+ else
+ {
+ }
+ /*
+ waiters++;
+
+ // FIXME this should be MsgWaitForMultipleObjects() as well probably
+ DWORD rc = ::WaitForSingleObject(event, timeout);
+
+ waiters--;
+
+ return rc != WAIT_TIMEOUT;
+ */
+ return wxCOND_NO_ERROR ;
+ }
+ wxCondError Signal()
+ {
+ wxMacStCritical critical ;
+ return wxCOND_NO_ERROR;
+ }
+
+ wxCondError Broadcast()
+ {
+ wxMacStCritical critical ;
+ return wxCOND_NO_ERROR;
+ }
+
+ wxArrayLong m_waiters ;
+ wxInt32 m_excessSignals ;
+ wxMutex& m_mutex;
+};
+
+// ----------------------------------------------------------------------------
+// wxCriticalSection implementation
+// ----------------------------------------------------------------------------
+
+// it's implemented as a mutex on mac os, so it is defined in the headers
+
+// ----------------------------------------------------------------------------
+// wxThread implementation
+// ----------------------------------------------------------------------------
+
+// wxThreadInternal class
+// ----------------------
+
+class wxThreadInternal
+{