diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-07-31 18:25:34 +0100 |
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-07-31 18:25:34 +0100 |
| commit | 40449e5fd41344c1a44c8acf5184ca4545fc7d0c (patch) | |
| tree | 1b6bc133777ecd3916a51d32ee8215cf697b436e | |
| parent | Explicit semaphore constructor (diff) | |
| download | mygrate-40449e5fd41344c1a44c8acf5184ca4545fc7d0c.tar.bz2 mygrate-40449e5fd41344c1a44c8acf5184ca4545fc7d0c.tar.xz mygrate-40449e5fd41344c1a44c8acf5184ca4545fc7d0c.zip | |
Unlocking an unlocked mutex trips tsan
| -rw-r--r-- | test/semaphore.cpp | 2 |
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(); |
