]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/thread.cpp
Update version to 2.9.4 in version.bkl too and rebake everything.
[wxWidgets.git] / src / osx / carbon / thread.cpp
index 3a55879a54ae34ce6c79db2fbfc3a5ee88d5f11f..429bf44ee44414ef01fd12f1acd18f23d1eb64db 100644 (file)
@@ -121,6 +121,11 @@ void wxCriticalSection::Enter()
     MPEnterCriticalRegion( (MPCriticalRegionID) m_critRegion, kDurationForever );
 }
 
     MPEnterCriticalRegion( (MPCriticalRegionID) m_critRegion, kDurationForever );
 }
 
+bool wxCriticalSection::TryEnter()
+{
+    return MPEnterCriticalRegion( (MPCriticalRegionID) m_critRegion, kDurationImmediate ) == noErr;
+}
+
 void wxCriticalSection::Leave()
 {
     MPExitCriticalRegion( (MPCriticalRegionID) m_critRegion );
 void wxCriticalSection::Leave()
 {
     MPExitCriticalRegion( (MPCriticalRegionID) m_critRegion );
@@ -940,7 +945,7 @@ wxThreadError wxThread::Resume()
 // exiting thread
 // -----------------------------------------------------------------------------
 
 // exiting thread
 // -----------------------------------------------------------------------------
 
-wxThread::ExitCode wxThread::Wait()
+wxThread::ExitCode wxThread::Wait(wxThreadWait WXUNUSED(waitMode))
 {
     wxCHECK_MSG( This() != this, (ExitCode)-1,
                  wxT("a thread can't wait for itself") );
 {
     wxCHECK_MSG( This() != this, (ExitCode)-1,
                  wxT("a thread can't wait for itself") );
@@ -953,7 +958,7 @@ wxThread::ExitCode wxThread::Wait()
     return m_internal->GetExitCode();
 }
 
     return m_internal->GetExitCode();
 }
 
-wxThreadError wxThread::Delete(ExitCode *rc)
+wxThreadError wxThread::Delete(ExitCode *rc, wxThreadWait WXUNUSED(waitMode))
 {
     wxCHECK_MSG( This() != this, wxTHREAD_MISC_ERROR,
                  wxT("a thread can't delete itself") );
 {
     wxCHECK_MSG( This() != this, wxTHREAD_MISC_ERROR,
                  wxT("a thread can't delete itself") );