Migration to named_thread<>

Add atomic_t<>::try_dec instead of fetch_dec_sat
Add atomic_t<>::try_inc
GDBDebugServer is broken (needs rewrite)
Removed old_thread class (former named_thread)
Removed storing/rethrowing exceptions from thread
Emu.Stop doesn't inject an exception anymore
task_stack helper class removed
thread_base simplified (no shared_from_this)
thread_ctrl::spawn simplified (creates detached thread)
Implemented overrideable thread detaching logic
Disabled cellAdec, cellDmux, cellFsAio
SPUThread renamed to spu_thread
RawSPUThread removed, spu_thread used instead
Disabled deriving from ppu_thread
Partial support for thread renaming
lv2_timer... simplified, screw it
idm/fxm: butchered support for on_stop/on_init
vm: improved allocation structure (added size)
This commit is contained in:
Nekotekina 2018-10-11 01:17:19 +03:00
parent 8ca6c9fff0
commit 1b37e775be
82 changed files with 1820 additions and 2023 deletions

View file

@ -258,7 +258,7 @@ u32 debugger_frame::GetPc() const
return 0;
}
return cpu->id_type() == 1 ? static_cast<ppu_thread*>(cpu.get())->cia : static_cast<SPUThread*>(cpu.get())->pc;
return cpu->id_type() == 1 ? static_cast<ppu_thread*>(cpu.get())->cia : static_cast<spu_thread*>(cpu.get())->pc;
}
void debugger_frame::UpdateUI()
@ -340,9 +340,8 @@ void debugger_frame::UpdateUnitList()
{
const QSignalBlocker blocker(m_choice_units);
idm::select<ppu_thread>(on_select);
idm::select<RawSPUThread>(on_select);
idm::select<SPUThread>(on_select);
idm::select<named_thread<ppu_thread>>(on_select);
idm::select<named_thread<spu_thread>>(on_select);
}
OnSelectUnit();
@ -369,21 +368,16 @@ void debugger_frame::OnSelectUnit()
return data == &cpu;
};
if (auto ppu = idm::select<ppu_thread>(on_select))
if (auto ppu = idm::select<named_thread<ppu_thread>>(on_select))
{
m_disasm = std::make_unique<PPUDisAsm>(CPUDisAsm_InterpreterMode);
cpu = ppu.ptr;
}
else if (auto spu1 = idm::select<SPUThread>(on_select))
else if (auto spu1 = idm::select<named_thread<spu_thread>>(on_select))
{
m_disasm = std::make_unique<SPUDisAsm>(CPUDisAsm_InterpreterMode);
cpu = spu1.ptr;
}
else if (auto rspu = idm::select<RawSPUThread>(on_select))
{
m_disasm = std::make_unique<SPUDisAsm>(CPUDisAsm_InterpreterMode);
cpu = rspu.ptr;
}
}
m_debugger_list->UpdateCPUData(this->cpu, m_disasm);
@ -540,7 +534,7 @@ u64 debugger_frame::EvaluateExpression(const QString& expression)
}
else
{
auto spu = static_cast<SPUThread*>(thread.get());
auto spu = static_cast<spu_thread*>(thread.get());
for (int i = 0; i < 128; ++i)
{