source: benchmark/mutexStmt/no_stmt_lock8.cfa @ 65502d8

enumforall-pointer-decay
Last change on this file since 65502d8 was 65502d8, checked in by caparsons <caparson@…>, 9 months ago

added some mutex stmt benchmarking

  • Property mode set to 100644
File size: 715 bytes
Line 
1#include <locks.hfa>
2#include <mutex_stmt.hfa>
3#include <stdio.h>
4
5#include "bench.h"
6
7single_acquisition_lock l1, l2, l3, l4, l5, l6, l7, l8;
8
9int 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.