1 // RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s
6 void *Thread(void *p
) {
8 barrier_wait(&barrier
);
13 barrier_init(&barrier
, 2);
15 sleep(1); // must not appear in the report
16 pthread_create(&t
, 0, Thread
, 0);
17 barrier_wait(&barrier
);
23 // CHECK: WARNING: ThreadSanitizer: data race
24 // CHECK-NOT: As if synchronized via sleep