summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-07-31 18:25:34 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-07-31 18:25:34 +0100
commit40449e5fd41344c1a44c8acf5184ca4545fc7d0c (patch)
tree1b6bc133777ecd3916a51d32ee8215cf697b436e
parentExplicit semaphore constructor (diff)
downloadmygrate-40449e5fd41344c1a44c8acf5184ca4545fc7d0c.tar.bz2
mygrate-40449e5fd41344c1a44c8acf5184ca4545fc7d0c.tar.xz
mygrate-40449e5fd41344c1a44c8acf5184ca4545fc7d0c.zip
Unlocking an unlocked mutex trips tsan
-rw-r--r--test/semaphore.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/semaphore.cpp b/test/semaphore.cpp
index 09124ee..b7e089f 100644
--- a/test/semaphore.cpp
+++ b/test/semaphore.cpp
@@ -21,7 +21,7 @@ semaphore::acquire()
bool
semaphore::try_dec()
{
- std::lock_guard lk {m};
+ m.lock();
if (v) {
v--;
m.unlock();