]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/tsan/default_options.cc
1 // RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
5 extern "C" const char *__tsan_default_options() {
6 return "report_bugs=0";
11 void *Thread1(void *x
) {
16 void *Thread2(void *x
) {
23 pthread_create(&t
[0], NULL
, Thread1
, NULL
);
24 pthread_create(&t
[1], NULL
, Thread2
, NULL
);
25 pthread_join(t
[0], NULL
);
26 pthread_join(t
[1], NULL
);
27 fprintf(stderr
, "DONE\n");
31 // CHECK-NOT: WARNING: ThreadSanitizer: data race