ExecAsCallback() removed

This commit is contained in:
Nekotekina 2014-09-13 01:14:48 +04:00
parent c1da446653
commit 10e9d383d4
11 changed files with 103 additions and 168 deletions

View file

@ -374,44 +374,3 @@ void CPUThread::Task()
if (Ini.HLELogging.GetValue()) LOG_NOTICE(PPU, "%s leave", CPUThread::GetFName().c_str());
}
s64 CPUThread::ExecAsCallback(u64 pc, bool wait, u64 a1, u64 a2, u64 a3, u64 a4) // not multithread-safe
{
while (m_alive)
{
if (Emu.IsStopped())
{
LOG_WARNING(PPU, "ExecAsCallback() aborted");
return CELL_ECANCELED; // doesn't mean anything
}
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
Stop();
Reset();
SetEntry(pc);
SetPrio(1001);
SetStackSize(0x10000);
SetExitStatus(CELL_OK);
SetArg(0, a1);
SetArg(1, a2);
SetArg(2, a3);
SetArg(3, a4);
Run();
Exec();
while (wait && m_alive)
{
if (Emu.IsStopped())
{
LOG_WARNING(PPU, "ExecAsCallback(wait=%s) aborted", wait ? "true" : "false");
return CELL_EABORT; // doesn't mean anything
}
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
return wait * m_exit_status;
}