mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 08:21:29 +12:00
The rest
This commit is contained in:
parent
e2d82394f6
commit
266db1336d
81 changed files with 2247 additions and 1731 deletions
|
@ -1,15 +1,15 @@
|
|||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/IdManager.h"
|
||||
|
||||
#include "Emu/Cell/PPUThread.h"
|
||||
#include "Emu/Cell/SPUThread.h"
|
||||
#include "Emu/Cell/RawSPUThread.h"
|
||||
#include "Emu/ARMv7/ARMv7Thread.h"
|
||||
#include "CPUThread.h"
|
||||
|
||||
#include <mutex>
|
||||
#include <condition_variable>
|
||||
|
||||
thread_local cpu_thread* g_tls_current_cpu_thread = nullptr;
|
||||
|
||||
extern std::mutex& get_current_thread_mutex();
|
||||
extern std::condition_variable& get_current_thread_cv();
|
||||
|
||||
void cpu_thread::on_task()
|
||||
{
|
||||
state -= cpu_state::exit;
|
||||
|
@ -61,7 +61,7 @@ void cpu_thread::on_task()
|
|||
void cpu_thread::on_stop()
|
||||
{
|
||||
state += cpu_state::exit;
|
||||
lock_notify();
|
||||
(*this)->lock_notify();
|
||||
}
|
||||
|
||||
cpu_thread::~cpu_thread()
|
||||
|
@ -121,35 +121,3 @@ bool cpu_thread::check_status()
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
[[noreturn]] void cpu_thread::xsleep()
|
||||
{
|
||||
throw std::runtime_error("cpu_thread: sleep()/awake() inconsistency");
|
||||
}
|
||||
|
||||
std::vector<std::shared_ptr<cpu_thread>> get_all_cpu_threads()
|
||||
{
|
||||
std::vector<std::shared_ptr<cpu_thread>> result;
|
||||
|
||||
for (auto& t : idm::get_all<PPUThread>())
|
||||
{
|
||||
result.emplace_back(t);
|
||||
}
|
||||
|
||||
for (auto& t : idm::get_all<SPUThread>())
|
||||
{
|
||||
result.emplace_back(t);
|
||||
}
|
||||
|
||||
for (auto& t : idm::get_all<RawSPUThread>())
|
||||
{
|
||||
result.emplace_back(t);
|
||||
}
|
||||
|
||||
for (auto& t : idm::get_all<ARMv7Thread>())
|
||||
{
|
||||
result.emplace_back(t);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue