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/+/31810
Tested-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
diff --git a/src/System/Synchronization.hpp b/src/System/Synchronization.hpp
index c3c8010..eb212aa 100644
--- a/src/System/Synchronization.hpp
+++ b/src/System/Synchronization.hpp
@@ -273,7 +273,6 @@
{
std::unique_lock<std::mutex> lock(mutex);
queue.push(item);
- lock.unlock();
added.notify_one();
}