2012-11-15 00:39:56 +01:00
|
|
|
#pragma once
|
|
|
|
|
#include "PPCThread.h"
|
|
|
|
|
|
2013-11-19 11:30:58 +01:00
|
|
|
enum PPCThreadType
|
|
|
|
|
{
|
2014-02-23 17:52:52 +01:00
|
|
|
PPC_THREAD_PPU,
|
|
|
|
|
PPC_THREAD_SPU,
|
|
|
|
|
PPC_THREAD_RAW_SPU
|
2013-11-19 11:30:58 +01:00
|
|
|
};
|
|
|
|
|
|
2013-06-30 10:46:29 +02:00
|
|
|
class PPCThreadManager
|
2012-11-15 00:39:56 +01:00
|
|
|
{
|
|
|
|
|
//IdManager m_threads_id;
|
|
|
|
|
//ArrayF<PPUThread> m_ppu_threads;
|
|
|
|
|
//ArrayF<SPUThread> m_spu_threads;
|
2014-04-10 00:54:32 +02:00
|
|
|
std::vector<PPCThread *> m_threads;
|
2013-08-19 01:06:11 +02:00
|
|
|
std::mutex m_mtx_thread;
|
|
|
|
|
wxSemaphore m_sem_task;
|
2014-02-23 17:52:52 +01:00
|
|
|
u32 m_raw_spu_num;
|
2012-11-15 00:39:56 +01:00
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
PPCThreadManager();
|
|
|
|
|
~PPCThreadManager();
|
|
|
|
|
|
|
|
|
|
void Close();
|
|
|
|
|
|
2013-07-12 14:42:17 +02:00
|
|
|
PPCThread& AddThread(PPCThreadType type);
|
2012-11-15 00:39:56 +01:00
|
|
|
void RemoveThread(const u32 id);
|
|
|
|
|
|
2014-04-10 00:54:32 +02:00
|
|
|
std::vector<PPCThread *>& GetThreads() { return m_threads; }
|
2013-07-12 14:42:17 +02:00
|
|
|
s32 GetThreadNumById(PPCThreadType type, u32 id);
|
2013-06-30 10:46:29 +02:00
|
|
|
PPCThread* GetThread(u32 id);
|
2012-11-15 00:39:56 +01:00
|
|
|
//IdManager& GetIDs() {return m_threads_id;}
|
|
|
|
|
|
|
|
|
|
void Exec();
|
2013-08-19 01:06:11 +02:00
|
|
|
void Task();
|
2013-11-19 11:30:58 +01:00
|
|
|
};
|