summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/tsan/output_tests/sleep_sync2.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/tsan/output_tests/sleep_sync2.cc')
-rw-r--r--compiler-rt/lib/tsan/output_tests/sleep_sync2.cc21
1 files changed, 0 insertions, 21 deletions
diff --git a/compiler-rt/lib/tsan/output_tests/sleep_sync2.cc b/compiler-rt/lib/tsan/output_tests/sleep_sync2.cc
deleted file mode 100644
index 017b9ba482d..00000000000
--- a/compiler-rt/lib/tsan/output_tests/sleep_sync2.cc
+++ /dev/null
@@ -1,21 +0,0 @@
-#include <pthread.h>
-#include <unistd.h>
-
-int X = 0;
-
-void *Thread(void *p) {
- X = 42;
- return 0;
-}
-
-int main() {
- pthread_t t;
- usleep(100*1000);
- pthread_create(&t, 0, Thread, 0);
- X = 43;
- pthread_join(t, 0);
- return 0;
-}
-
-// CHECK: WARNING: ThreadSanitizer: data race
-// CHECK-NOT: As if synchronized via sleep
OpenPOWER on IntegriCloud