Fixed thread issues

Fixed args passing
Fixed thread stopping/pausing (temporarily)
Fixed problems with SC_Condition and SC_Mutex (partially)
This commit is contained in:
Nekotekina 2014-02-03 17:12:25 +04:00
parent a0c8e116df
commit 311486ed79
10 changed files with 60 additions and 19 deletions

View file

@ -89,14 +89,12 @@ void CPUThread::Wait(const CPUThread& thr)
bool CPUThread::Sync()
{
wxCriticalSectionLocker lock(m_cs_sync);
return m_sync_wait;
}
int CPUThread::ThreadStatus()
{
if(Emu.IsStopped())
if(Emu.IsStopped() || IsStopped() || IsPaused())
{
return CPUThread_Stopped;
}
@ -236,7 +234,7 @@ void CPUThread::Pause()
DoPause();
Emu.CheckStatus();
ThreadBase::Stop();
// ThreadBase::Stop(); // "Abort() called" exception
#ifndef QT_UI
wxGetApp().SendDbgCommand(DID_PAUSED_THREAD, this);
#endif