Commit c77a18aa by Ben Clayton

System/Synchronization.hpp: Remove unlock() call before notify_one()

In this particular case, I do not see the issue described in b/133135427 to ever happen here - however helgrind seems to find this questionable, and unless this is causing a noticable performance impact I think we should err on the side of caution. Bug: b/133135427 Change-Id: I1e5fa02ed28b6146f8a6044999f92b141e001e13 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/31810Tested-by: 's avatarBen Clayton <bclayton@google.com> Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent b54838a9
......@@ -273,7 +273,6 @@ void Chan<T>::put(const T &item)
{
std::unique_lock<std::mutex> lock(mutex);
queue.push(item);
lock.unlock();
added.notify_one();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment