mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 08:51:28 +12:00
28 lines
554 B
C++
28 lines
554 B
C++
#pragma once
|
|
class CPUThread;
|
|
enum CPUThreadType : unsigned char;
|
|
|
|
class CPUThreadManager
|
|
{
|
|
std::vector<CPUThread*> m_threads;
|
|
std::mutex m_mtx_thread;
|
|
rSemaphore m_sem_task;
|
|
u32 m_raw_spu_num;
|
|
|
|
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);
|
|
|
|
void Exec();
|
|
void Task();
|
|
};
|