1 // RUN: %clang_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s
8 void AnnotateIgnoreReadsBegin(const char *f
, int l
);
9 void AnnotateIgnoreReadsEnd(const char *f
, int l
);
10 void AnnotateIgnoreWritesBegin(const char *f
, int l
);
11 void AnnotateIgnoreWritesEnd(const char *f
, int l
);
14 void *Thread(void *p
) {
22 pthread_create(&t
, 0, Thread
, p
);
24 AnnotateIgnoreReadsBegin(__FILE__
, __LINE__
);
25 AnnotateIgnoreWritesBegin(__FILE__
, __LINE__
);
27 AnnotateIgnoreReadsEnd(__FILE__
, __LINE__
);
28 AnnotateIgnoreWritesEnd(__FILE__
, __LINE__
);
30 fprintf(stderr
, "OK\n");
34 // CHECK-NOT: WARNING: ThreadSanitizer: data race