#include #include #include "../bench.h" monitor M {} m1, m2; void __attribute__((noinline)) call( M & mutex m1, M & mutex m2 ) {} volatile bool go = false; void call() { go = true; for ( i; times ) { call( m1, m2 ); } go = false; } thread T {}; void main( T & this ) { while ( ! go ); while ( go ) { call( m1, m2 ); } } 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: //