1 // RUN: %clangxx_tsan -O1 --std=c++11 %s -o %t && %run %t 2>&1 | FileCheck %s
2 #include "custom_mutex.h"
4 // Test that custom annotations provide normal mutex synchronization
5 // (no race reports for properly protected critical sections).
10 void *thr(void *arg
) {
11 barrier_wait(&barrier
);
19 barrier_init(&barrier
, 2);
21 pthread_create(&th
, 0, thr
, 0);
22 barrier_wait(&barrier
);
27 fprintf(stderr
, "DONE\n");