1 // RUN: %clangxx_tsan -O1 --std=c++11 %s -o %t && %deflake %run %t 2>&1 | FileCheck %s
2 #include "custom_mutex.h"
4 // Test that Broadcast does not induce parasitic synchronization.
10 barrier_wait(&barrier
);
20 barrier_init(&barrier
, 2);
22 pthread_create(&th
, 0, thr
, 0);
24 barrier_wait(&barrier
);
29 fprintf(stderr
, "DONE\n");
33 // CHECK: ThreadSanitizer: data race