File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change 1
- // RUN: %clangxx_tsan %s -fsanitize=thread -o %t && %run %t 2>&1 | Filecheck %s
1
+ // RUN: %clangxx_tsan %s -fsanitize=thread -o %t && %run %t 2>&1 | FileCheck %s
2
2
3
3
#include < mutex>
4
4
#include < stdio.h>
5
5
6
- int main (){
7
- const unsigned short NUM_OF_MTX = 128 ;
8
- std::mutex mutexes[NUM_OF_MTX];
6
+ int main () {
7
+ const unsigned short NUM_OF_MTX = 128 ;
8
+ std::mutex mutexes[NUM_OF_MTX];
9
9
10
- for (int i = 0 ; i < NUM_OF_MTX; i++){
11
- mutexes[i].lock ();
12
- }
13
- for (int i = 0 ; i < NUM_OF_MTX; i++){
14
- mutexes[i].unlock ();
15
- }
10
+ for (int i = 0 ; i < NUM_OF_MTX; i++) {
11
+ mutexes[i].lock ();
12
+ }
13
+ for (int i = 0 ; i < NUM_OF_MTX; i++) {
14
+ mutexes[i].unlock ();
15
+ }
16
16
17
- printf (" Success\n " );
17
+ printf (" Success\n " );
18
18
19
- return 0 ;
19
+ return 0 ;
20
20
}
21
21
22
22
// CHECK: Success
You can’t perform that action at this time.
0 commit comments