1 // RUN: %clang_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
7 void *Thread(void *x
) {
8 pthread_mutex_lock((pthread_mutex_t
*)x
);
9 pthread_mutex_unlock((pthread_mutex_t
*)x
);
15 pthread_mutex_init(&Mtx
, 0);
17 pthread_create(&t
, 0, Thread
, &Mtx
);
19 pthread_mutex_destroy(&Mtx
);
24 // CHECK: WARNING: ThreadSanitizer: data race