source:
benchmark/mutexStmt/no_stmt_lock2.cfa
@
fcd65ca
Last change on this file since fcd65ca was a5d1fe7, checked in by , 3 years ago | |
---|---|
|
|
File size: 381 bytes |
Rev | Line | |
---|---|---|
[65502d8] | 1 | #include <locks.hfa> |
2 | #include <mutex_stmt.hfa> | |
3 | #include <stdio.h> | |
4 | ||
5 | #include "bench.h" | |
6 | ||
[a5d1fe7] | 7 | test_spinlock l1, l2; |
[65502d8] | 8 | |
9 | int main( int argc, char * argv[] ) { | |
10 | BENCH_START() | |
11 | BENCH( | |
12 | for ( times ) { | |
13 | lock( l1 ); | |
14 | lock( l2 ); | |
15 | unlock( l2 ); | |
16 | unlock( l1 ); | |
17 | }, | |
18 | result | |
19 | ) | |
20 | printf( "%g\n", result ); | |
21 | } | |
22 | ||
23 | // Local Variables: // | |
24 | // tab-width: 4 // | |
25 | // End: // |
Note: See TracBrowser
for help on using the repository browser.