mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 08:51:28 +12:00
Memory alignment fix
Some mutexes added, _sys_heap_memalign implemented
This commit is contained in:
parent
15dd0bb0f2
commit
7fce5589f8
16 changed files with 236 additions and 116 deletions
|
@ -76,6 +76,8 @@ void CPUThreadManager::RemoveThread(const u32 id)
|
|||
|
||||
s32 CPUThreadManager::GetThreadNumById(CPUThreadType type, u32 id)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_mtx_thread);
|
||||
|
||||
s32 num = 0;
|
||||
|
||||
for(u32 i=0; i<m_threads.GetCount(); ++i)
|
||||
|
@ -89,16 +91,17 @@ s32 CPUThreadManager::GetThreadNumById(CPUThreadType type, u32 id)
|
|||
|
||||
CPUThread* CPUThreadManager::GetThread(u32 id)
|
||||
{
|
||||
for(u32 i=0; i<m_threads.GetCount(); ++i)
|
||||
{
|
||||
if(m_threads[i].GetId() == id) return &m_threads[i];
|
||||
}
|
||||
CPUThread* res;
|
||||
|
||||
return nullptr;
|
||||
Emu.GetIdManager().GetIDData(id, res);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
void CPUThreadManager::Exec()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_mtx_thread);
|
||||
|
||||
for(u32 i=0; i<m_threads.GetCount(); ++i)
|
||||
{
|
||||
m_threads[i].Exec();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue