1 // RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
7 void *Thread(void *x
) {
10 barrier_wait(&barrier
);
15 barrier_init(&barrier
, 2);
16 ANNOTATE_BENIGN_RACE(Global
);
17 WTF_ANNOTATE_BENIGN_RACE(WTFGlobal
);
19 pthread_create(&t
, 0, Thread
, 0);
20 barrier_wait(&barrier
);
24 fprintf(stderr
, "OK\n");
27 // CHECK-NOT: WARNING: ThreadSanitizer: data race