[PATCH] D60344: [TSan][libdispatch] Fix test
Julian Lettner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 5 15:55:42 PDT 2019
yln created this revision.
Herald added subscribers: llvm-commits, Sanitizers, kubamracek.
Herald added projects: Sanitizers, LLVM.
We have barrier_init(..., 2), but 4 calls to barrier_wait.
I think in this test we want to show that dispatch_barrier synchronizes
with all blocks before and after on the same queue. So we need to use
the same queue (bgq -> q).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D60344
Files:
compiler-rt/test/tsan/Darwin/gcd-barrier.mm
Index: compiler-rt/test/tsan/Darwin/gcd-barrier.mm
===================================================================
--- compiler-rt/test/tsan/Darwin/gcd-barrier.mm
+++ compiler-rt/test/tsan/Darwin/gcd-barrier.mm
@@ -28,7 +28,8 @@
global = 43;
});
- dispatch_async(bgq, ^{
+ barrier_init(&barrier, 2);
+ dispatch_async(q, ^{
barrier_wait(&barrier);
global = 44;
});
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60344.193981.patch
Type: text/x-patch
Size: 410 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190405/a7d4caac/attachment.bin>
More information about the llvm-commits
mailing list