mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 00:41:26 +12:00
SC_Semaphore rewritten
This commit is contained in:
parent
e79236a97f
commit
5da33c6243
9 changed files with 254 additions and 101 deletions
|
@ -108,6 +108,22 @@ CPUThread* CPUThreadManager::GetThread(u32 id)
|
|||
return res;
|
||||
}
|
||||
|
||||
void CPUThreadManager::NotifyThread(const u32 id)
|
||||
{
|
||||
if (!id) return;
|
||||
|
||||
std::lock_guard<std::mutex> lock(m_mtx_thread);
|
||||
|
||||
for (u32 i = 0; i < m_threads.size(); i++)
|
||||
{
|
||||
if (m_threads[i]->GetId() == id)
|
||||
{
|
||||
m_threads[i]->Notify();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CPUThreadManager::Exec()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_mtx_thread);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue