#include #include #include #include "bench.h" test_spinlock l1, l2, l3, l4, l5, l6, l7, l8; int main( int argc, char * argv[] ) { BENCH_START() BENCH( for ( times ) { lock( l1 ); lock( l2 ); lock( l3 ); lock( l4 ); lock( l5 ); lock( l6 ); lock( l7 ); lock( l8 ); unlock( l8 ); unlock( l7 ); unlock( l6 ); unlock( l5 ); unlock( l4 ); unlock( l3 ); unlock( l2 ); unlock( l1 ); }, result ) printf( "%g\n", result ); } // Local Variables: // // tab-width: 4 // // End: //