#include #include #include "../bench.h" monitor M {} m1, m2, m3, m4; void __attribute__((noinline)) call( M & mutex m1, M & mutex m2, M & mutex m3, M & mutex m4 ) {} volatile bool go = false; void call() { go = true; for ( times ) { call( m1, m2, m3, m4 ); } go = false; } thread T {}; void main( T & this ) { while ( ! go ); while ( go ) { call( m1, m2, m3, m4 ); } } int main( int argc, char * argv[] ) { BENCH_START() T t; BENCH( call( m1, m2 ), result ) printf( "%g\n", result ); } // Local Variables: // // tab-width: 4 // // End: //