mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-14 10:48:36 +12:00
SMutex eliminated
This commit is contained in:
parent
0fb092f2a5
commit
b2de24db73
48 changed files with 768 additions and 907 deletions
|
@ -136,23 +136,6 @@ protected:
|
|||
public:
|
||||
virtual ~CPUThread();
|
||||
|
||||
u32 m_wait_thread_id;
|
||||
|
||||
std::mutex m_cs_sync;
|
||||
bool m_sync_wait;
|
||||
void Wait(bool wait);
|
||||
void Wait(const CPUThread& thr);
|
||||
bool Sync();
|
||||
|
||||
template<typename T>
|
||||
void WaitFor(T func)
|
||||
{
|
||||
while(func(ThreadStatus()))
|
||||
{
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
}
|
||||
}
|
||||
|
||||
int ThreadStatus();
|
||||
|
||||
void NextPc(u8 instr_size);
|
||||
|
@ -280,7 +263,7 @@ public:
|
|||
thread->SetJoinable(false);
|
||||
|
||||
while (thread->IsRunning())
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1)); // hack
|
||||
|
||||
return thread->GetExitStatus();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue