summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/AsyncRequests.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2016-08-05 16:04:39 +0200
committerLéo Lam <leo@innovatetechnologi.es>2016-08-10 16:08:15 +0200
commitdca22e08eb96a401406ef7fa62c59eea1b837f7b (patch)
tree5b404c3f0f13cb0cd716f9e311089e7989d8d8de /Source/Core/VideoCommon/AsyncRequests.cpp
parentc6a0e543a520204c1e56033ffa2511252b0dda4a (diff)
Use Common::Flag and Common::Event when possible
Replaces old and simple usages of std::atomic<bool> with Common::Flag (which was introduced after the initial usage), so it's clear that the variable is a flag and because Common::Flag is well tested. This also replaces the ready logic in WiimoteReal with Common::Event since it was basically just unnecessarily reimplementing Common::Event.
Diffstat (limited to 'Source/Core/VideoCommon/AsyncRequests.cpp')
-rw-r--r--Source/Core/VideoCommon/AsyncRequests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/AsyncRequests.cpp b/Source/Core/VideoCommon/AsyncRequests.cpp
index 32f407373b..d88bb7aa50 100644
--- a/Source/Core/VideoCommon/AsyncRequests.cpp
+++ b/Source/Core/VideoCommon/AsyncRequests.cpp
@@ -19,7 +19,7 @@ AsyncRequests::AsyncRequests() : m_enable(false), m_passthrough(true)
void AsyncRequests::PullEventsInternal()
{
std::unique_lock<std::mutex> lock(m_mutex);
- m_empty.store(true);
+ m_empty.Set();
while (!m_queue.empty())
{
@@ -76,7 +76,7 @@ void AsyncRequests::PushEvent(const AsyncRequests::Event& event, bool blocking)
return;
}
- m_empty.store(false);
+ m_empty.Clear();
m_wake_me_up_again |= blocking;
if (!m_enable)