std::shared_ptr in IdManager

This commit is contained in:
Nekotekina 2014-12-24 02:38:13 +03:00
parent b2de24db73
commit d8239a39c9
47 changed files with 654 additions and 622 deletions

View file

@ -6,7 +6,7 @@ enum CPUThreadType : unsigned char;
class CPUThreadManager
{
std::vector<CPUThread*> m_threads;
std::vector<std::shared_ptr<CPUThread>> m_threads;
std::mutex m_mtx_thread;
public:
@ -18,9 +18,9 @@ public:
CPUThread& AddThread(CPUThreadType type);
void RemoveThread(const u32 id);
std::vector<CPUThread*>& GetThreads() { return m_threads; }
//std::vector<std::shared_ptr<CPUThread>>& GetThreads() { return m_threads; }
s32 GetThreadNumById(CPUThreadType type, u32 id);
CPUThread* GetThread(u32 id);
std::shared_ptr<CPUThread> GetThread(u32 id);
RawSPUThread* GetRawSPUThread(u32 num);
void Exec();