]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/thread.cpp
64 bit fixes
[wxWidgets.git] / src / mac / carbon / thread.cpp
index a2d66b51f3373812184dcad6e1aa97564bf5fc6c..da4c2c1c9cc173e2e5610bac2ac4ed94a39b116d 100644 (file)
 
 #include "wx/thread.h"
 
-#ifdef __WXMAC__
-#ifdef __DARWIN__
-    #include <CoreServices/CoreServices.h>
-#else
-    #include <DriverServices.h>
-    #include <Multiprocessing.h>
-#endif
-
+#include <CoreServices/CoreServices.h>
 #include "wx/mac/uma.h"
-#endif
-
-#include "wx/mac/macnotfy.h"
-
 
 // the possible states of the thread:
 // ("=>" shows all possible transitions from this state)
@@ -136,15 +125,9 @@ void wxCriticalSection::Leave()
 // wxMutex implementation
 // ----------------------------------------------------------------------------
 
-#if TARGET_API_MAC_OSX
 #define wxUSE_MAC_SEMAPHORE_MUTEX 0
 #define wxUSE_MAC_CRITICAL_REGION_MUTEX 1
 #define wxUSE_MAC_PTHREADS_MUTEX 0
-#else
-#define wxUSE_MAC_SEMAPHORE_MUTEX 0
-#define wxUSE_MAC_CRITICAL_REGION_MUTEX 1
-#define wxUSE_MAC_PTHREADS_MUTEX 0
-#endif
 
 #if wxUSE_MAC_PTHREADS_MUTEX
 
@@ -430,7 +413,7 @@ private:
     bool m_isOk ;
 };
 
-wxMutexInternal::wxMutexInternal( wxMutexType mutexType )
+wxMutexInternal::wxMutexInternal( wxMutexType WXUNUSED(mutexType) )
 {
     m_isOk = false;
     m_critRegion = kInvalidID;
@@ -837,7 +820,7 @@ wxCondError wxConditionInternal::WaitTimeout( unsigned long milliseconds )
 
     wxSemaError err = m_semaphore.WaitTimeout(milliseconds);
 
-    if ( err == wxSEMA_BUSY )
+    if ( err == wxSEMA_TIMEOUT )
     {
         // another potential race condition exists here it is caused when a
         // 'waiting' thread timesout, and returns from WaitForSingleObject, but
@@ -1255,9 +1238,7 @@ bool wxThread::IsMain()
 
 void wxThread::Yield()
 {
-#if TARGET_API_MAC_OSX
     CFRunLoopRunInMode( kCFRunLoopDefaultMode , 0 , true ) ;
-#endif
 
     MPYield();
 }
@@ -1278,7 +1259,7 @@ unsigned long wxThread::GetCurrentId()
     return (unsigned long)MPCurrentTaskID();
 }
 
-bool wxThread::SetConcurrency( size_t level )
+bool wxThread::SetConcurrency( size_t WXUNUSED(level) )
 {
     // Cannot be set in MacOS.
     return false;