[compiler-rt] r358204 - [TSan][libdispatch] Change test to have two simultaneous timers

Julian Lettner via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 11 11:14:16 PDT 2019


Author: yln
Date: Thu Apr 11 11:14:16 2019
New Revision: 358204

URL: http://llvm.org/viewvc/llvm-project?rev=358204&view=rev
Log:
[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

Modified:
    compiler-rt/trunk/test/tsan/Darwin/gcd-after.mm

Modified: compiler-rt/trunk/test/tsan/Darwin/gcd-after.mm
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/Darwin/gcd-after.mm?rev=358204&r1=358203&r2=358204&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/Darwin/gcd-after.mm (original)
+++ compiler-rt/trunk/test/tsan/Darwin/gcd-after.mm Thu Apr 11 11:14:16 2019
@@ -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;
 }




More information about the llvm-commits mailing list