source:
benchmark/mutexStmt/no_stmt_lock8.cfa
@
a3769cc
Last change on this file since a3769cc was 65502d8, checked in by , 3 years ago | |
---|---|
|
|
File size: 715 bytes |
Line | |
---|---|
1 | #include <locks.hfa> |
2 | #include <mutex_stmt.hfa> |
3 | #include <stdio.h> |
4 | |
5 | #include "bench.h" |
6 | |
7 | single_acquisition_lock l1, l2, l3, l4, l5, l6, l7, l8; |
8 | |
9 | int main( int argc, char * argv[] ) { |
10 | BENCH_START() |
11 | BENCH( |
12 | for ( times ) { |
13 | lock( l1 ); |
14 | lock( l2 ); |
15 | lock( l3 ); |
16 | lock( l4 ); |
17 | lock( l5 ); |
18 | lock( l6 ); |
19 | lock( l7 ); |
20 | lock( l8 ); |
21 | unlock( l8 ); |
22 | unlock( l7 ); |
23 | unlock( l6 ); |
24 | unlock( l5 ); |
25 | unlock( l4 ); |
26 | unlock( l3 ); |
27 | unlock( l2 ); |
28 | unlock( l1 ); |
29 | }, |
30 | result |
31 | ) |
32 | printf( "%g\n", result ); |
33 | } |
34 | |
35 | // Local Variables: // |
36 | // tab-width: 4 // |
37 | // End: // |
Note: See TracBrowser
for help on using the repository browser.