wxGTK compiles (and links) when configured without threads

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 1998-12-28 15:36:14 +00:00
parent 6244848856
commit c5f885c034
2 changed files with 34 additions and 18 deletions

View File

@ -31,23 +31,23 @@ wxMutex::~wxMutex()
wxMutexError wxMutex::Lock() wxMutexError wxMutex::Lock()
{ {
m_locked++; m_locked++;
return MUTEX_NO_ERROR; return wxMUTEX_NO_ERROR;
} }
wxMutexError wxMutex::TryLock() wxMutexError wxMutex::TryLock()
{ {
if (m_locked > 0) if (m_locked > 0)
return MUTEX_BUSY; return wxMUTEX_BUSY;
m_locked++; m_locked++;
return MUTEX_NO_ERROR; return wxMUTEX_NO_ERROR;
} }
wxMutexError wxMutex::Unlock() wxMutexError wxMutex::Unlock()
{ {
if (m_locked == 0) if (m_locked == 0)
return MUTEX_UNLOCKED; return wxMUTEX_UNLOCKED;
m_locked--; m_locked--;
return MUTEX_NO_ERROR; return wxMUTEX_NO_ERROR;
} }
wxCondition::wxCondition() wxCondition::wxCondition()
@ -85,22 +85,22 @@ wxThreadError wxThread::Create()
{ {
p_internal->exit_status = Entry(); p_internal->exit_status = Entry();
OnExit(); OnExit();
return THREAD_NO_ERROR; return wxTHREAD_NO_ERROR;
} }
wxThreadError wxThread::Destroy() wxThreadError wxThread::Destroy()
{ {
return THREAD_NOT_RUNNING; return wxTHREAD_NOT_RUNNING;
} }
wxThreadError wxThread::Pause() wxThreadError wxThread::Pause()
{ {
return THREAD_NOT_RUNNING; return wxTHREAD_NOT_RUNNING;
} }
wxThreadError wxThread::Resume() wxThreadError wxThread::Resume()
{ {
return THREAD_NOT_RUNNING; return wxTHREAD_NOT_RUNNING;
} }
void wxThread::DeferDestroy( bool WXUNUSED(on) ) void wxThread::DeferDestroy( bool WXUNUSED(on) )
@ -181,3 +181,11 @@ void wxThreadModule::OnExit()
} }
IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule) IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule)
void wxMutexGuiEnter()
{
}
void wxMutexGuiLeave()
{
}

View File

@ -31,23 +31,23 @@ wxMutex::~wxMutex()
wxMutexError wxMutex::Lock() wxMutexError wxMutex::Lock()
{ {
m_locked++; m_locked++;
return MUTEX_NO_ERROR; return wxMUTEX_NO_ERROR;
} }
wxMutexError wxMutex::TryLock() wxMutexError wxMutex::TryLock()
{ {
if (m_locked > 0) if (m_locked > 0)
return MUTEX_BUSY; return wxMUTEX_BUSY;
m_locked++; m_locked++;
return MUTEX_NO_ERROR; return wxMUTEX_NO_ERROR;
} }
wxMutexError wxMutex::Unlock() wxMutexError wxMutex::Unlock()
{ {
if (m_locked == 0) if (m_locked == 0)
return MUTEX_UNLOCKED; return wxMUTEX_UNLOCKED;
m_locked--; m_locked--;
return MUTEX_NO_ERROR; return wxMUTEX_NO_ERROR;
} }
wxCondition::wxCondition() wxCondition::wxCondition()
@ -85,22 +85,22 @@ wxThreadError wxThread::Create()
{ {
p_internal->exit_status = Entry(); p_internal->exit_status = Entry();
OnExit(); OnExit();
return THREAD_NO_ERROR; return wxTHREAD_NO_ERROR;
} }
wxThreadError wxThread::Destroy() wxThreadError wxThread::Destroy()
{ {
return THREAD_NOT_RUNNING; return wxTHREAD_NOT_RUNNING;
} }
wxThreadError wxThread::Pause() wxThreadError wxThread::Pause()
{ {
return THREAD_NOT_RUNNING; return wxTHREAD_NOT_RUNNING;
} }
wxThreadError wxThread::Resume() wxThreadError wxThread::Resume()
{ {
return THREAD_NOT_RUNNING; return wxTHREAD_NOT_RUNNING;
} }
void wxThread::DeferDestroy( bool WXUNUSED(on) ) void wxThread::DeferDestroy( bool WXUNUSED(on) )
@ -181,3 +181,11 @@ void wxThreadModule::OnExit()
} }
IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule) IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule)
void wxMutexGuiEnter()
{
}
void wxMutexGuiLeave()
{
}