[PATCH] D33521: [sanitizer] Pair atomic acquire with release in BlockingMutex::Unlock
Aleksey Shlyapnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 25 08:07:22 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL303869: [sanitizer] Pair atomic acquire with release in BlockingMutex::Unlock (authored by alekseyshl).
Changed prior to commit:
https://reviews.llvm.org/D33521?vs=100166&id=100247#toc
Repository:
rL LLVM
https://reviews.llvm.org/D33521
Files:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
@@ -549,7 +549,7 @@
void BlockingMutex::Unlock() {
atomic_uint32_t *m = reinterpret_cast<atomic_uint32_t *>(&opaque_storage_);
- u32 v = atomic_exchange(m, MtxUnlocked, memory_order_relaxed);
+ u32 v = atomic_exchange(m, MtxUnlocked, memory_order_release);
CHECK_NE(v, MtxUnlocked);
if (v == MtxSleeping) {
#if SANITIZER_FREEBSD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33521.100247.patch
Type: text/x-patch
Size: 601 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170525/886a9373/attachment.bin>
More information about the llvm-commits
mailing list