1 // RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s
7 void *Thread(void *a
) {
9 barrier_wait(&barrier
);
14 barrier_init(&barrier
, 2);
17 pthread_create(&t
, NULL
, Thread
, p
);
18 barrier_wait(&barrier
);
20 pthread_join(t
, NULL
);
24 // CHECK: WARNING: ThreadSanitizer: data race