summaryrefslogtreecommitdiff
path: root/test/tsan/Darwin
diff options
context:
space:
mode:
authorJulian Lettner <jlettner@apple.com>2019-04-11 18:14:16 +0000
committerJulian Lettner <jlettner@apple.com>2019-04-11 18:14:16 +0000
commit0de82e414cccd1dd9562a8e4eabbf134cbc4cef5 (patch)
treebedc42904e7491464f73aa7dbb089c05b101a306 /test/tsan/Darwin
parent62458a4a1feeda451f55a8194b7737e99e7e6aca (diff)
downloadcompiler-rt-0de82e414cccd1dd9562a8e4eabbf134cbc4cef5.tar.gz
[TSan][libdispatch] Change test to have two simultaneous timers
Change test semantics by waiting for both timer callbacks at the end instead of serializing operations: start/wait timer 1 then 2. Reviewed By: kubamracek Differential Revision: https://reviews.llvm.org/D60476 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@358204 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/tsan/Darwin')
-rw-r--r--test/tsan/Darwin/gcd-after.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/tsan/Darwin/gcd-after.mm b/test/tsan/Darwin/gcd-after.mm
index 38c2effca..59281e76d 100644
--- a/test/tsan/Darwin/gcd-after.mm
+++ b/test/tsan/Darwin/gcd-after.mm
@@ -27,12 +27,12 @@ int main(int argc, const char *argv[]) {
dispatch_semaphore_signal(done);
});
- dispatch_semaphore_wait(done, DISPATCH_TIME_FOREVER);
my_global2 = 10;
dispatch_after_f(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(10 * NSEC_PER_MSEC)), q, NULL, &callback);
dispatch_semaphore_wait(done, DISPATCH_TIME_FOREVER);
+ dispatch_semaphore_wait(done, DISPATCH_TIME_FOREVER);
fprintf(stderr, "done\n");
return 0;
}