mirror of
https://github.com/RPCSX/rpcsx.git
synced 2025-12-06 07:12:14 +01:00
30 lines
572 B
C++
30 lines
572 B
C++
#pragma once
|
|
|
|
class CPUThread;
|
|
class RawSPUThread;
|
|
enum CPUThreadType : unsigned char;
|
|
|
|
class CPUThreadManager
|
|
{
|
|
std::vector<CPUThread*> m_threads;
|
|
std::mutex m_mtx_thread;
|
|
|
|
public:
|
|
CPUThreadManager();
|
|
~CPUThreadManager();
|
|
|
|
void Close();
|
|
|
|
CPUThread& AddThread(CPUThreadType type);
|
|
void RemoveThread(const u32 id);
|
|
void NotifyThread(const u32 id);
|
|
|
|
std::vector<CPUThread*>& GetThreads() { return m_threads; }
|
|
s32 GetThreadNumById(CPUThreadType type, u32 id);
|
|
CPUThread* GetThread(u32 id);
|
|
RawSPUThread* GetRawSPUThread(u32 num);
|
|
|
|
void Exec();
|
|
void Task();
|
|
};
|