rpcsx/rpcs3/Emu/CPU/CPUThreadManager.h

30 lines
655 B
C
Raw Normal View History

#pragma once
class CPUThread;
class RawSPUThread;
enum CPUThreadType : unsigned char;
class CPUThreadManager
{
2014-12-24 00:38:13 +01:00
std::vector<std::shared_ptr<CPUThread>> m_threads;
std::mutex m_mtx_thread;
public:
CPUThreadManager();
~CPUThreadManager();
void Close();
CPUThread& AddThread(CPUThreadType type);
void RemoveThread(const u32 id);
2014-12-24 00:38:13 +01:00
//std::vector<std::shared_ptr<CPUThread>>& GetThreads() { return m_threads; }
s32 GetThreadNumById(CPUThreadType type, u32 id);
2014-12-24 00:38:13 +01:00
std::shared_ptr<CPUThread> GetThread(u32 id);
2015-01-23 22:48:14 +01:00
std::shared_ptr<CPUThread> GetThread(u32 id, CPUThreadType type);
RawSPUThread* GetRawSPUThread(u32 num);
void Exec();
void Task();
};