#include #include #include #include "../bench.h" test_spinlock LOCKS; bool done = false; uint64_t total = 0; thread worker {}; void main( worker & w ) { BENCH( mutex ( LOCKS ) { }, total, done ) } int main( int argc, char * argv[] ) { BENCH_START() processor p[threads]; // one extra for main thread { worker w[threads]; sleep( 10`s ); done = true; } printf( "%lu\n", total ); } // Local Variables: // // tab-width: 4 // // End: //