diff options
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 |