source:
benchmark/mutexStmt/no_stmt_lock4.cfa
@
cef7430
Last change on this file since cef7430 was a5d1fe7, checked in by , 3 years ago | |
---|---|
|
|
File size: 489 bytes |
Line | |
---|---|
1 | #include <locks.hfa> |
2 | #include <mutex_stmt.hfa> |
3 | #include <stdio.h> |
4 | |
5 | #include "bench.h" |
6 | |
7 | test_spinlock l1, l2, l3, l4; |
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 | unlock( l4 ); |
18 | unlock( l3 ); |
19 | unlock( l2 ); |
20 | unlock( l1 ); |
21 | }, |
22 | result |
23 | ) |
24 | printf( "%g\n", result ); |
25 | } |
26 | |
27 | // Local Variables: // |
28 | // tab-width: 4 // |
29 | // End: // |
Note: See TracBrowser
for help on using the repository browser.