[clang-format] Rename ExportBlockIndentation -> IndentExportBlock (#123493)
[llvm-project.git] / compiler-rt / test / tsan / bench_acquire_release.cpp
blob3799452a1629a35383ebb29385b3deaaa3c4152c
1 // RUN: %clangxx_tsan %s -o %t
2 // RUN: %run %t 2>&1 | FileCheck %s
4 // bench.h needs pthread barriers which are not available on OS X
5 // UNSUPPORTED: darwin
7 #include "bench.h"
9 int x;
11 void thread(int tid) {
12 for (int i = 0; i < bench_niter; i++)
13 __atomic_fetch_add(&x, 1, __ATOMIC_ACQ_REL);
16 void bench() {
17 start_thread_group(bench_nthread, thread);
20 // CHECK: DONE