diff options
| author | Glenn Rice <glennricster@gmail.com> | 2011-03-05 21:58:54 +0000 |
|---|---|---|
| committer | Glenn Rice <glennricster@gmail.com> | 2011-03-05 21:58:54 +0000 |
| commit | 024a87af7ac6ddf0719e3c7fc0cac5bca3e8812d (patch) | |
| tree | a6fedaea072e471152e8d46bf78108f221b0b8a7 /Source/Core/Common | |
| parent | 9abf449e7c3d6c2977662e75e2f418c5d8fa24d2 (diff) | |
Fix the Host_GetKeyState deadlock caused by Billiard's latest changes.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7304 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common')
| -rw-r--r-- | Source/Core/Common/Src/Thread.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/Core/Common/Src/Thread.h b/Source/Core/Common/Src/Thread.h index 244a8dd2f0..ea4f8057db 100644 --- a/Source/Core/Common/Src/Thread.h +++ b/Source/Core/Common/Src/Thread.h @@ -71,6 +71,10 @@ private: class Barrier { public: + Barrier() + : m_count(2), m_waiting(0) + {} + Barrier(size_t count) : m_count(count), m_waiting(0) {} @@ -80,7 +84,7 @@ public: { std::unique_lock<std::mutex> lk(m_mutex); - if (m_count == ++m_waiting) + if (m_count >= ++m_waiting) { m_waiting = 0; m_condvar.notify_all(); |
