summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1a03b3e)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27314
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#if TARGET_API_MAC_OSX
#define wxUSE_MAC_SEMAPHORE_MUTEX 0
#if TARGET_API_MAC_OSX
#define wxUSE_MAC_SEMAPHORE_MUTEX 0
-#define wxUSE_MAC_CRITICAL_REGION_MUTEX 0
-#define wxUSE_MAC_PTHREADS_MUTEX 1
+#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
#else
#define wxUSE_MAC_SEMAPHORE_MUTEX 0
#define wxUSE_MAC_CRITICAL_REGION_MUTEX 1
{
if ( m_semaphore != kInvalidID )
MPDeleteSemaphore( m_semaphore);
{
if ( m_semaphore != kInvalidID )
MPDeleteSemaphore( m_semaphore);
}
wxMutexError wxMutexInternal::Lock()
}
wxMutexError wxMutexInternal::Lock()
{
wxCHECK_MSG( m_isOk , wxMUTEX_MISC_ERROR , wxT("Invalid Mutex") ) ;
OSStatus err = MPSignalSemaphore( m_semaphore);
{
wxCHECK_MSG( m_isOk , wxMUTEX_MISC_ERROR , wxT("Invalid Mutex") ) ;
OSStatus err = MPSignalSemaphore( m_semaphore);
if ( err)
{
wxLogSysError(_("Could not unlock mutex"));
return wxMUTEX_MISC_ERROR;
}
if ( err)
{
wxLogSysError(_("Could not unlock mutex"));
return wxMUTEX_MISC_ERROR;
}
return wxMUTEX_NO_ERROR;
}
return wxMUTEX_NO_ERROR;
}
{
if ( m_critRegion != kInvalidID )
MPDeleteCriticalRegion( m_critRegion);
{
if ( m_critRegion != kInvalidID )
MPDeleteCriticalRegion( m_critRegion);
}
wxMutexError wxMutexInternal::Lock()
}
wxMutexError wxMutexInternal::Lock()
{
wxCHECK_MSG( m_isOk , wxMUTEX_MISC_ERROR , wxT("Invalid Mutex") ) ;
OSStatus err = MPExitCriticalRegion( m_critRegion);
{
wxCHECK_MSG( m_isOk , wxMUTEX_MISC_ERROR , wxT("Invalid Mutex") ) ;
OSStatus err = MPExitCriticalRegion( m_critRegion);
if ( err)
{
wxLogSysError(_("Could not unlock mutex"));
if ( err)
{
wxLogSysError(_("Could not unlock mutex"));
{
if( m_semaphore != kInvalidID )
MPDeleteSemaphore( m_semaphore);
{
if( m_semaphore != kInvalidID )
MPDeleteSemaphore( m_semaphore);
}
wxSemaError wxSemaphoreInternal::WaitTimeout(unsigned long milliseconds)
}
wxSemaError wxSemaphoreInternal::WaitTimeout(unsigned long milliseconds)
wxSemaError wxSemaphoreInternal::Post()
{
OSStatus err = MPSignalSemaphore( m_semaphore);
wxSemaError wxSemaphoreInternal::Post()
{
OSStatus err = MPSignalSemaphore( m_semaphore);
if ( err)
{
return wxSEMA_MISC_ERROR;
if ( err)
{
return wxSEMA_MISC_ERROR;