diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-01-07 19:55:37 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-01-07 19:55:37 +0000 |
commit | ca9211ecdede9bdedb812b2243a4abdb8dacd1b9 (patch) | |
tree | 9b19e801150082c33e9152275829a6ce90614b55 /lib/tsan/lit_tests/tiny_race.c | |
parent | 8ef50bf3d1c287b5013c3168de77a462dfce3495 (diff) |
Diffstat (limited to 'lib/tsan/lit_tests/tiny_race.c')
-rw-r--r-- | lib/tsan/lit_tests/tiny_race.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/lib/tsan/lit_tests/tiny_race.c b/lib/tsan/lit_tests/tiny_race.c deleted file mode 100644 index f77e1606c1dd2..0000000000000 --- a/lib/tsan/lit_tests/tiny_race.c +++ /dev/null @@ -1,21 +0,0 @@ -// RUN: %clang_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s -#include <pthread.h> -#include <unistd.h> - -int Global; - -void *Thread1(void *x) { - sleep(1); - Global = 42; - return x; -} - -int main() { - pthread_t t; - pthread_create(&t, 0, Thread1, 0); - Global = 43; - pthread_join(t, 0); - return Global; -} - -// CHECK: WARNING: ThreadSanitizer: data race |