Some cleanup 2

This commit is contained in:
Nekotekina 2014-07-10 04:13:04 +04:00
parent b5f376f834
commit 22b9afdb60
5 changed files with 262 additions and 82 deletions

View file

@ -110,22 +110,14 @@ CPUThread* CPUThreadManager::GetThread(u32 id)
RawSPUThread* CPUThreadManager::GetRawSPUThread(u32 num)
{
std::lock_guard<std::mutex> lock(m_mtx_thread);
for (u32 i = 0; i < m_threads.size(); i++)
if (num < sizeof(Memory.RawSPUMem) / sizeof(Memory.RawSPUMem[0]))
{
if (m_threads[i]->GetType() == CPU_THREAD_RAW_SPU)
{
RawSPUThread* t = (RawSPUThread*)m_threads[i];
if (t->GetIndex() == num)
{
return t;
}
}
return (RawSPUThread*)Memory.RawSPUMem[num];
}
else
{
return nullptr;
}
return nullptr;
}
void CPUThreadManager::NotifyThread(const u32 id)