compilation fixes for the recent commit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -483,7 +483,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
wxSemaphoreInternal::wxSemaphoreInternal( int initialcount, int maxcount )
|
wxSemaphoreInternal::wxSemaphoreInternal( int initialcount, int maxcount )
|
||||||
: m_cond(m_mutex)
|
: m_cond(&m_mutex)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ( (initialcount < 0) || ((maxcount > 0) && (initialcount > maxcount)) )
|
if ( (initialcount < 0) || ((maxcount > 0) && (initialcount > maxcount)) )
|
||||||
@@ -497,11 +497,11 @@ wxSemaphoreInternal::wxSemaphoreInternal( int initialcount, int maxcount )
|
|||||||
|
|
||||||
void wxSemaphoreInternal::Wait()
|
void wxSemaphoreInternal::Wait()
|
||||||
{
|
{
|
||||||
wxMutexLocker locker(*m_mutex);
|
wxMutexLocker locker(m_mutex);
|
||||||
|
|
||||||
while ( count <= 0 )
|
while ( count <= 0 )
|
||||||
{
|
{
|
||||||
m_cond->Wait();
|
m_cond.Wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
count--;
|
count--;
|
||||||
@@ -509,7 +509,7 @@ void wxSemaphoreInternal::Wait()
|
|||||||
|
|
||||||
bool wxSemaphoreInternal::TryWait()
|
bool wxSemaphoreInternal::TryWait()
|
||||||
{
|
{
|
||||||
wxMutexLocker locker(*m_mutex);
|
wxMutexLocker locker(m_mutex);
|
||||||
|
|
||||||
if ( count <= 0 )
|
if ( count <= 0 )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -521,7 +521,7 @@ bool wxSemaphoreInternal::TryWait()
|
|||||||
|
|
||||||
bool wxSemaphoreInternal::Wait( unsigned long timeout_millis )
|
bool wxSemaphoreInternal::Wait( unsigned long timeout_millis )
|
||||||
{
|
{
|
||||||
wxMutexLocker locker( *m_mutex );
|
wxMutexLocker locker(m_mutex);
|
||||||
|
|
||||||
wxLongLong startTime = wxGetLocalTimeMillis();
|
wxLongLong startTime = wxGetLocalTimeMillis();
|
||||||
|
|
||||||
@@ -532,7 +532,7 @@ bool wxSemaphoreInternal::Wait( unsigned long timeout_millis )
|
|||||||
if ( remainingTime <= 0 )
|
if ( remainingTime <= 0 )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
bool result = m_cond->Wait( remainingTime );
|
bool result = m_cond.Wait( remainingTime );
|
||||||
if ( !result )
|
if ( !result )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -544,16 +544,16 @@ bool wxSemaphoreInternal::Wait( unsigned long timeout_millis )
|
|||||||
|
|
||||||
void wxSemaphoreInternal::Post()
|
void wxSemaphoreInternal::Post()
|
||||||
{
|
{
|
||||||
wxMutexLocker locker(*m_mutex);
|
wxMutexLocker locker(m_mutex);
|
||||||
|
|
||||||
if ( (maxcount > 0) && (count == maxcount) )
|
if ( maxcount > 0 && count == maxcount )
|
||||||
{
|
{
|
||||||
wxFAIL_MSG( _T("wxSemaphore::Post() overflow") );
|
wxFAIL_MSG( _T("wxSemaphore::Post() overflow") );
|
||||||
}
|
}
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
|
|
||||||
m_cond->Signal();
|
m_cond.Signal();
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user