1 // RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
4 void *Thread(void *p
) {
6 barrier_wait(&barrier
);
11 barrier_init(&barrier
, 2);
14 pthread_create(&t
, 0, Thread
, p
);
15 barrier_wait(&barrier
);
16 AnnotateIgnoreReadsBegin(__FILE__
, __LINE__
);
17 AnnotateIgnoreWritesBegin(__FILE__
, __LINE__
);
19 AnnotateIgnoreReadsEnd(__FILE__
, __LINE__
);
20 AnnotateIgnoreWritesEnd(__FILE__
, __LINE__
);
22 fprintf(stderr
, "OK\n");
26 // CHECK-NOT: WARNING: ThreadSanitizer: data race